[Python-Dev] "Global freepool"
Serhiy Storchaka
storchaka at gmail.com
Thu Jun 1 16:16:53 EDT 2017
01.06.17 21:44, Larry Hastings пише:
> p.s. Speaking of freelists, at one point Serhiy had a patch adding a
> freelist for single- and I think two-digit ints. Right now the only int
> creation optimization we have is the array of constant "small ints"; if
> the int you're constructing isn't one of those, we use the normal slow
> allocation path with PyObject_Alloc etc. IIRC this patch made things
> faster. Serhiy, what happened to that patch? Was it actually a bad
> idea, or did it just get forgotten?
The issue [1] still is open. Patches neither applied nor rejected. They
exposes the speed up in microbenchmarks, but it is not large. Up to 40%
for iterating over enumerate() and 5-7% for hard integer computations
like base85 encoding or spectral_norm benchmark.
[1] https://bugs.python.org/issue25324
More information about the Python-Dev
mailing list