Why is this loop heavy code so slow in Python? Possible Project Euler spoilers

jwrweatherley at gmail.com jwrweatherley at gmail.com
Mon Sep 3 09:39:46 EDT 2007


Thanks for all the answers to my question. I think what I need to take
away from this is that xrange is an object - I thought it was just
some loop construct, and that maths is slow in python - so avoid
pathological looping.I remember the first time I tried Objective-C on
OS X I used the NSNumber class for arithmetic - the results that time
were pretty awful too!





More information about the Python-list mailing list