Python Timeit Module
Code timing — timeit, repeat, default_timer. This category documents 4 Python timeit module entries, and each page gives you the full syntax, the parameter list, the return value, and a runnable example. The entries include: timeit.timeit(), timeit.repeat(), timeit.default_timer(), timeit.Timer(). timeit.timeit() times the execution of a small Python code snippet. timeit.repeat() like timeit() but runs multiple times and returns a list of results. timeit.default_timer() default timer for timeit (uses time.perf_counter). timeit.Timer() creates a Timer object for repeated timing of code. Timeit Module belongs to the Dev Tools group alongside Inspect Module, Pdb Module, Traceback Module, GC Module. You can also search across every category from the search page, browse the complete A–Z index, or try any example in the Python playground. Python Reference documents 978+ functions, methods, and modules across 114 categories of the standard library, and every entry in this Timeit Module category follows the same format — syntax first, then what it does, the parameters it accepts, what it returns, and a working code example — so once you have read one page you can read them all.