Delaney, Timothy (Tim) wrote: > Tom Anderson wrote: > > >>Except that in smalltalk, this isn't true: in ST, every variable >>*appears* to contain a reference to an object, but implementations >>may not actually work like that. In particular, SmallTalk 80 (and >>some earlier smalltalks, and all subsequent smalltalks, i think) >>handles small integers (those that fit in wordsize-1 bits) >>differently: all variables contain a word, whose bottom bit is a tag >>bit; if it's one, the word is a genuine reference, and if it's zero, >>the top bits of the word contain a signed integer. > > > This type of implementation has been discussed on python-dev. IIRC it > was decided by Guido that unless anyone wanted to implement it and show > a significant performance advantage without any regressions on any > platform, it wasn't worth it.
AFAIK some LISPs do a similar trick to carry int values on cons-cells. And by this tehy reduce integer precision to 28 bit or something. Surely _not_ going to pass a regression test suite :) Diez -- http://mail.python.org/mailman/listinfo/python-list