[Python-Dev] stackable ints [stupid idea (ignore) :v]

Tim Peters tim_one at email.msn.com
Fri Jun 11 05:08:28 CEST 1999

Jumping in to opine that mixing tag/type bits with native pointers is a
Really Bad Idea.  Put the bits on the low end and word-addressed machines
are screwed.  Put the bits on the high end and you've made severe
assumptions about how the platform parcels out address space.  In any case
you're stuck with ugly macros everywhere.

This technique was pioneered by Lisps, and was beautifully exploited by the
Symbolics Lisp Machine and TI Lisp Explorer hardware.  Lisp people don't
want to admit those failed, so continue simulating the HW design by hand at
comparatively sluggish C speed <0.6 wink>.

BTW, I've never heard this approach argued as a speed optimization (except
in the HW implementations):  software mask-test-branch around every
inc/dec-ref to exempt ints  is a nasty new repeated expense.  The original
motivation was to save space, and that back in the days when a 128Mb RAM
chip wasn't even conceivable, let alone under $100 <wink>.

    experience-today-wink>-ly y'rs  - tim

More information about the Python-Dev mailing list