Ma Lin <malin...@163.com> added the comment:
This range has not been changed since "preallocated small integer pool" was introduced: #define NSMALLPOSINTS 257 #define NSMALLNEGINTS 5 The commit (Jan 2007): https://github.com/python/cpython/commit/ddefaf31b366ea84250fc5090837c2b764a04102 Is it worth increase the range? FYI, build with MSVC 2017, the `small_ints` size: 32-bit build: sizeof(PyLongObject) 16 bytes sizeof(small_ints) 4192 bytes 64-bit build: sizeof(PyLongObject) 32 bytes sizeof(small_ints) 8384 bytes ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38015> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com