Message260268
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. |
|
Date |
User |
Action |
Args |
2016-02-14 10:12:07 | pitrou | set | recipients:
+ pitrou, lemburg, brett.cannon, rhettinger, mark.dickinson, scoder, vstinner, larry, serhiy.storchaka, yselivanov |
2016-02-14 10:12:07 | pitrou | set | messageid: <1455444727.91.0.271017153973.issue24165@psf.upfronthosting.co.za> |
2016-02-14 10:12:07 | pitrou | link | issue24165 messages |
2016-02-14 10:12:07 | pitrou | create | |
|