Antoine Pitrou added the comment:

The test suite can't really be representative of common workloads and it isn't 
meant to be.

The real question is not so much if the freelist helps reduce the number of 
integer allocations (it's obvious it will), it's whether doing so actually 
speeds up Python significantly. The small object allocator is quite fast.

If freelisting one-digit integers doesn't bring any tangible benefits, it's 
unlikely that freelisting two-digit integers will. The general distribution of 
integers probably follows some kind of power law (which is why small integers 
are interned).

And since most installs are probably 64-bit nowadays, single-digit integers go 
up to 2**30, which covers the immense majority of uses.

----------

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

Reply via email to