News for hackers. Stuff that matters.
Re: (Python) Generator Tricks For Systems Programmer (pdf) by drats on Wednesday December 14, 2011 @06:06AM (#3351406)
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.
Re: (Python) Generator Tricks For Systems Programmer (pdf) by bryanh on Wednesday December 14, 2011 @03:14PM (#3353408)
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!

Re: (Python) Generator Tricks For Systems Programmer (pdf) by drats on Wednesday December 14, 2011 @08:24PM (#3354605)
Thanks, the future looks bright. Although RAM usage would be higher for pypy the improvement is massive.
Re: (Python) Generator Tricks For Systems Programmer (pdf) by bryanh on Thursday December 15, 2011 @01:01PM (#3357160)
I checked, PyPy used about 30mb, while vanilla Python was right around 3-4mb. So an order of magnitude.