Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Why Is Python So Popular in 2025? – The PyCharm Blog. Parent comment
Really?
$ python -m timeit -s 'import random; x = [random.random() for _ in range(100000000)]' 'sum(x)' 1 loop, best of 5: 806 msec per loop
$ time python -c 'import random; x = [random.random() for _ in range(100000000)]' real 0m10.942s user 0m9.590s sys 0m1.346s
There are no comments on this comment yet.
Really?
This is on 11-year-old hardware. Even the generation isn't that slow: Of course, Python forces the use of doubles internally. Any optimizations inherent to 32-bit floats are simply not available.