Skip to content

Instantly share code, notes, and snippets.

@wllmtrng
Created March 8, 2015 18:33
Show Gist options
  • Save wllmtrng/ede5cbfd510deb0e02c8 to your computer and use it in GitHub Desktop.
Save wllmtrng/ede5cbfd510deb0e02c8 to your computer and use it in GitHub Desktop.
python timeit boilerplate
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