Skip to content

Instantly share code, notes, and snippets.

@nickylimjj
Created November 20, 2017 12:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nickylimjj/48635d2019b905ce39b1e4aea17048ce to your computer and use it in GitHub Desktop.
Save nickylimjj/48635d2019b905ce39b1e4aea17048ce to your computer and use it in GitHub Desktop.
Python list Implementation
$ python -m timeit --setup="x = [None]*1000" "x[500]"
10000000 loops, best of 3: 0.0579 usec per loop
$ python -m timeit --setup="x = [None]*1000" "x[0]"
10000000 loops, best of 3: 0.0566 usec per loop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment