Last active
January 1, 2016 23:08
-
-
Save zinking/8214291 to your computer and use it in GitHub Desktop.
This file contains 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 foo(): | |
pass; | |
if __name__ == '__main__': | |
import timeit | |
print(timeit.timeit("test()", setup="from __main__ import test", number=10)) | |
if __name__=='__main__': | |
from timeit import Timer | |
t = Timer(lambda: foo(bar) ) | |
print t.timeit(number=1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment