[Python-ideas] Save memory when forking with *really* immutable objects

Stefan Behnel stefan_ml at behnel.de
Thu Mar 15 07:20:35 CET 2012

Jim Jewett, 14.03.2012 23:07:
> On Mon, Mar 12, 2012 at 8:10 PM, Larry Hastings wrote:
>> The obvious first step: add a magical reference count number that never
>> changes, called Py_REF_ETERNAL.
> If you have a magic number, you need to check before doing the update;
> at some point in the distant past, that was considered too expensive
> because it is done so often.

Well, we could switch to a floating point value for the refcount and let
the CPU do it for us by using +inf as magic value.

(this is python-ideas, right?)


More information about the Python-ideas mailing list