"Alf P. Steinbach" <al...@start.no> writes: > * Hrvoje Niksic: >> "Alf P. Steinbach" <al...@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. -- http://mail.python.org/mailman/listinfo/python-list