Skip to content

Instantly share code, notes, and snippets.

@mpage
Created October 5, 2022 23:32
Show Gist options
  • Save mpage/b3006c3b490460272d7a95438345b3f3 to your computer and use it in GitHub Desktop.
Save mpage/b3006c3b490460272d7a95438345b3f3 to your computer and use it in GitHub Desktop.
import timeit
def test():
def noop():
pass
return noop
if __name__ == "__main__":
print(timeit.timeit("test()", setup="from __main__ import test", number=100000))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment