Created
April 24, 2019 20:44
-
-
Save DahlitzFlorian/0c3ed7242b7609c053b8bf202f4c9f52 to your computer and use it in GitHub Desktop.
Article: How To Create Your Own Timing Context Manager
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 = [i for i in range(100)] | |
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