|
From: Andreas R. <and...@gm...> - 2004-04-06 22:35:50
|
Yoshiki, > I'd like to have 30 bit for a char. The scheme I proposed wouldn't get us there unless we would reserve "10" for characters and that (for me) doesn't seem worth the hazzle of dealing with the "extra immediates". The point of the proposal was that similar to compact classes there may be a number of immediate classes and we would definitely reserve some space so people would be able to define their own. So there would always be "a few bits" taken away and 24 made sense to me because it is divisable by two as well as three and four (none of the values above are) so you would have the option to say you use either 24, 2x12, 3x8, or 4x6 bit which seems worthwhile if you take it with the (potentially) 63 immediate classes you could define. > I think once Tim suggested this, but how about using "01" for OOP > and "00" for SmallInteger? Some processor's addressing mode let us > access the word-aligned memory with such pointer, while "no-tag" for > SmallInteger may save some bit-operations. I don't think that's a good idea. For one thing, the places where we use tag checks today, would still require them (no advantage there). For another if a processor doesn't have a way of ignoring the low bits you pay significant penalties (disadvantage here). Lastly, I don't really see where this would really help any integer operations - most of them can simply drop the low bits and would have to do this regardless of whether there's a one or a zero in it (no clear advantage here). So it seems that this equation seems to be heavier on the "don't do it if you are uncertain if all processors can do it efficiently" side. Cheers, - Andreas |