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

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to