Skip to content

Instantly share code, notes, and snippets.

View Utumno's full-sized avatar
🧐

Utumno

🧐
View GitHub Profile
import timeit
repeat = 7
numbers = 1000
# repeat = numbers = 1 # uncomment to count cmp and equal calls
def time(statement, _setup=None):
print min(
timeit.Timer(statement, setup=_setup or setup).repeat(repeat, numbers))