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

jwrweatherley at gmail.com jwrweatherley at gmail.com
Sun Sep 2 09:45:16 EDT 2007


[snip code]

Thanks for that. I realise that improving the algorithm will speed
things up. I wanted to know why my less than perfect algorithm was so
much slower in python than exactly the same algorithm in C. Even when
turning off gcc's optimiser with the -O0 flag, the C version is still
> 100 times quicker.




More information about the Python-list mailing list