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

For me, range (the posted source) took 95 seconds, and xrange was only a little better at 85 seconds.

I think most of the benefit of xrange comes from the decreased memory usage, not from lower CPU usage. But xrange is definitely closer to what the other code is doing.



that's almost a 10% improvement- not just a little better!




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

Search: