Author pitrou
Recipients brett.cannon, larry, lemburg, mark.dickinson, pitrou, rhettinger, scoder, serhiy.storchaka, vstinner, yselivanov
Date 2016-02-14.10:12:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1455444727.91.0.271017153973.issue24165@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-02-14 10:12:07pitrousetrecipients: + pitrou, lemburg, brett.cannon, rhettinger, mark.dickinson, scoder, vstinner, larry, serhiy.storchaka, yselivanov
2016-02-14 10:12:07pitrousetmessageid: <1455444727.91.0.271017153973.issue24165@psf.upfronthosting.co.za>
2016-02-14 10:12:07pitroulinkissue24165 messages
2016-02-14 10:12:07pitroucreate