Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Python Patterns - An Optimization Anecdote. Parent comment
For eg. using python 2.5.2
In [9]: l = ['10'] * 5000000
In [10]: timeit -n5 map(int, l)
5 loops, best of 3: 1.29 s per loop
In [11]: timeit -n5 [int(i) for i in l]
5 loops, best of 3: 1.64 s per loop
For eg. using python 2.5.2
In [9]: l = ['10'] * 5000000
In [10]: timeit -n5 map(int, l)
5 loops, best of 3: 1.29 s per loop
In [11]: timeit -n5 [int(i) for i in l]
5 loops, best of 3: 1.64 s per loop