leotok / timeit-wrapper

🐍⏱An alternative way of using the python 'timeit' module

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Timeit wrapper

An alternate way of using the python 'timeit' module

Keep all the algorithms you want to check inside the same folder as timer.py and run python timer.py! You can pass the number of loops as a parameter or it will use the default (1000 loops).

Ex:

Directory tree:

  • ../unique_character_string/
    • array_sorting_algorithm.py
    • bitmap_algorithm.py
    • set_algorithm.py
    • timer.py

$ python timer.py 10000

loops:  10000
folder:  ../unique_character_string

array_sorting_algorithm.py
time:  0.314327001572 secs

bitmap_algorithm.py
time:  0.498764038086 secs

set_algorithm.py
time:  0.129238128662 secs

About

🐍⏱An alternative way of using the python 'timeit' module


Languages

Language:Python 100.0%