Skip to content

Instantly share code, notes, and snippets.

@smarnach
Created December 13, 2011 14:38
Show Gist options
  • Save smarnach/1472334 to your computer and use it in GitHub Desktop.
Save smarnach/1472334 to your computer and use it in GitHub Desktop.
In [1]: %timeit sum([(0, 0)] * 1000, ())
100 loops, best of 3: 5.01 ms per loop
In [2]: %timeit sum([(0, 0)] * 10000, ())
1 loops, best of 3: 490 ms per loop
In [3]: %timeit sum([(0, 0)] * 100000, ())
1 loops, best of 3: 61.9 s per loop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment