Skip to content

Comment on (Python) Generator Tricks For Systems Programmer (pdf)

Comments

I love this pdf. The one thing I've been wanting is for the original author, or someone else with another ~1gig dataset, to do the test again with pypy and give us the speed figures.

Running the same scripts (mostly, except my Apache log lines were a bit longer) on a 1.1GB file resulted in:

python 2.7.1: list - 15.7s / generator - 14.1s

pypy 1.7: list - 7.5s / generator - 7.7s

On a MBP 2.2ghz i7 w/8gb. Fun!

Thanks, the future looks bright. Although RAM usage would be higher for pypy the improvement is massive.

I checked, PyPy used about 30mb, while vanilla Python was right around 3-4mb. So an order of magnitude.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.