[issue10044] small int optimization

Mark Dickinson report at bugs.python.org
Thu Oct 7 18:13:52 CEST 2010


Mark Dickinson <dickinsm at gmail.com> added the comment:

Maybe we could consider adding an extra field to a PyLong giving its 'small_int' value for small values, and some flag value for non-small longs.  An extra field wouldn't actually enlarge the size of a PyLong for small values---on a 64-bit machine, a value like 23L takes 28 bytes, for which 32 bytes will actually be allocated (since Python always allocates in multiples of 8 bytes, I believe).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10044>
_______________________________________


More information about the Python-bugs-list mailing list