[Python-Dev] Store startup modules as C structures for 20%+ startup speed improvement?

Christian Heimes christian at python.org
Fri Sep 21 11:13:27 EDT 2018

On 21/09/2018 16.26, Guido van Rossum wrote:
>> What about the small integers cache?
> I believe the small integers cache is only used to reduce the number of
> objects -- I don't think there's any code (in CPython itself) that just
> *assumes* that because an int is small it must be in the cache. So it
> should be fine.

Some places may assume that PyLong_FromLong() for a small int never
fails. I certainly expect this in coverity scan modeling.


More information about the Python-Dev mailing list