Created
March 8, 2015 18:33
-
-
Save wllmtrng/ede5cbfd510deb0e02c8 to your computer and use it in GitHub Desktop.
python timeit boilerplate
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 test(): | |
"""Stupid test function""" | |
L = [] | |
for i in range(100): | |
L.append(i) | |
if __name__ == '__main__': | |
import timeit | |
print(timeit.timeit("test()", setup="from __main__ import test")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment