Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I was a little surprised that the genlog.py program is said in the slides to be slightly faster than the nongenlog.py... That is, several chained generator expressions actually ran faster than an explicitly written "for" loop. I suppose it may have something to do with using the C-implemented sum() function rather than doing a running total in Python; nevertheless, I expected more overhead from the generators. Very cool.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: