Created
February 15, 2014 22:24
-
-
Save cas--/9026031 to your computer and use it in GitHub Desktop.
Timeit example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def func(val): | |
val**10 | |
import timeit | |
timeit.repeat("for n in range(100): func(n)", | |
"from __main__ import func", | |
number=10000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment