Stefan Behnel added the comment:

> there are three ingredients here - sum, (x)range and the integer addition 
> that sum will be performing at each iteration.

... not to forget the interpreter startup time on his machine. :)

I did a tiny bit of profiling and about 90% of the time seems to be spent 
creating and deallocating throw-away PyLong objects. My guess is that it simply 
lacks a free-list in _PyLong_New().

----------
nosy: +scoder

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24076>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to