int/float/long free lists (was Re: magic memory leak, Python or Windows problem?)
Tim Peters
tim.one at comcast.net
Fri May 2 16:12:56 EDT 2003
[Tim]
> ...
> Python doesn't even try to return memory for int objects to the system
> until it shuts down; instead memory for int objects is saved in a
> dedicated int-object free list, for quick reuse later.
[Aahz]
> What about longs? How does/will that affect int/long integration? (I
> see from longobject.c that we currently don't have a free list for
> longs; when we convert entirely to longs, what effect will that have on
> performance?)
int/long unification is about the numeric model presented to the programmer;
it doesn't require the implementation to eradicate the distinction. Note
that there are only a few steps remaining to full implementation of PEP 237,
and the int/long distinction under the covers is as strong as it ever was.
Indeed, for the sake of C API compatibility, PEP 237 says the implementation
distinction will remain. So "no" and "none" are plausible answers to your
questions -- although only an idiot would believe them <wink>.
More information about the Python-list
mailing list