is None or == None ?
hniksic at xemacs.org
Sun Nov 8 11:00:17 CET 2009
"Alf P. Steinbach" <alfps at start.no> writes:
> * Hrvoje Niksic:
>> "Alf P. Steinbach" <alfps at start.no> writes:
>>> Speedup would likely be more realistic with normal implementation (not
>>> fiddling with bit-fields and stuff)
>> I'm not sure I understand this. How would you implement tagged integers
>> without encoding type information in bits of the pointer value?
> A normal tag field, as illustrated in code earlier in the thread.
Ah, I see it now. That proposal effectively doubles the size of what is
now a PyObject *, meaning that lists, dicts, etc., would also double
their memory requirements, so it doesn't come without downsides. On the
other hand, tagged pointers have been used in various Lisp
implementations for decades, nothing really "baroque" (or inherently
slow) about them.
More information about the Python-list