[issue24138] Speed up range() by caching and modifying long objects

Marc-Andre Lemburg report at bugs.python.org
Mon May 11 10:57:43 CEST 2015


Marc-Andre Lemburg added the comment:

I like the idea of adding a free list of longs in Python 3, but I think we should extend this somewhat to cover more ground, e.g. by pre-allocating a block of 1 digit long objects, like we did for Python 2 ints, and perhaps allocate up to 4k (= 1 memory page) towards such a free list.

The added cache locality of having the data in a pre-allocated block should provide some more performance.

----------
nosy: +lemburg

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24138>
_______________________________________


More information about the Python-bugs-list mailing list