Thanks Bryce and Andrew for your quick and informative responses.&nbsp; Comments/questions below.<br><br><div><span class="gmail_quote">On 8/4/07, <b class="gmail_sendername"><a href="mailto:bryce@kampjes.demon.co.uk">bryce@kampjes.demon.co.uk
</a></b> &lt;<a href="mailto:bryce@kampjes.demon.co.uk">bryce@kampjes.demon.co.uk</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>You don&#39;t need to shift the numbers for addition and subtraction, just<br>make sure the bottom bits are 0. Even with the tag being 1, you<br>only need to detag one argument and if that&#39;s a constant the<br>detagging can be done at compile time.
<br><br>With multiplication and division only one argument needs to be<br>shifted.</blockquote><div><br><br>Interesting.&nbsp; Well, I assume that in Smalltalk object access is much more often then integer access, but does anyone have any data that proves this?&nbsp; If it is the case then I guess that&#39;s the death of my MSB tagging idea. :)
<br><br>Doesn&#39;t Strongtalk use 0 tagged SmallIntegers?&nbsp; And if so, why?&nbsp; I looked in the source code a bit but I haven&#39;t figured out yet where that would be.<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>It was used by some Lisp systems in the mid 80&#39;s. I think CMU Common<br>Lisp from memory.<br><br>There are two disadvantages of using the top bit:<br>1) You need to control the address space to make sure all objects
<br>live. Controlling the address space to that degree is unlikely to<br>be something that can be done portably.<br>2) You loose half your address space.</blockquote><div><br><br>Well, I suppose I could shift the pointers up one (which would make the first bit zero) to reclaim the space, but as I believe it must be the case that object access is much more common then number access, that would be a bad trade-off.&nbsp;
<br></div><div>&nbsp;</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Alignment. Words are aligned to 4 byte boundaries which is always<br>
required for performance and required by some CPU architectures.</blockquote><div><br><br>I see, I didn&#39;t realize the bottom 2 bits had to be zero.&nbsp; That answers a lot of my questions. :)<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
There is a large literature on garbage collection. These day&#39;s I&#39;d try<br>citeseer as well as Google. Scanning PLDI and OOPSLA proceedings from<br>the late 70s and 80s will provide plenty of information if you&#39;ve
<br>either got ACM membership or access to a university library.<br><br>Bryce</blockquote><div><br><br>I have the &quot;Garbage Collection&quot; book from Jones &amp; Lins, but I will try to look on those sites as well.&nbsp; I just need to go to the &quot;ACM digital library&quot;, no? 
<br></div><br></div>