[Python-ideas] Expansion of the range of small integers

Serhiy Storchaka storchaka at gmail.com
Mon Sep 17 18:35:01 CEST 2012


On 17.09.12 16:29, Antoine Pitrou wrote:
> See also http://bugs.python.org/issue10044

This is interesting. But the main trick causes an undefined behavior.

>> 1) Memory consumption increases by constant 1-1.5 MB.
>
> That sounds a bit annoying. Is it for a 32-bit or 64-bit build?

For a 32-bit it is 14*(2**16-257-5) = 913836 B = 0.87 MiB. For a 64-bit 
it should be twice as large (1.74 MiB). If you want expand the range to 
portable maximum.





More information about the Python-ideas mailing list