<br><br><div class="gmail_quote">On Tue, May 4, 2010 at 2:12 PM, Adrian Lienhard <span dir="ltr">&lt;<a href="mailto:adi@netstyle.ch" target="_blank">adi@netstyle.ch</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<br>
Hi Mariano,<br>
<br>
I see two solutions<br>
- make the identityHash (even) smaller<br></blockquote><div><br>Hi Adrian. Thanks for you answer. I am still newbie with the VM and there are a lot of things I don&#39;t understand :(<br><br>I though that in squeak the hash of an object was the address in memory. Then I though this was in Smalltalk 80 where you had an object table, and thus, there were no problem with the address of an object. In squeak I think that the Object Table doesn&#39;t exist anymore, but objects can change address, while the Hash shouldn&#39;t be modified. That&#39;s why you need 12 bits of hash in the object header ?   so...you always use this 12 bits for hash and not the address of the object at all ?  I ask because in the book &quot;Squeak Open Personal  Computing and Multimedia&quot; that I am reading, it says:<br>
<br>&quot;12 bits object hash (for hashed Set usage)&quot;<br><br>But if it is only for hashed Set..what happens with the hash of normal objects?   As I see in the code, it ALSO uses those 12 bits. I am right ? Maybe this changed from the time the book was written. <br>
<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
- remove compact classes<br>
<br>
The former would probably not be hard to implement (just change some bit masks and then rehash all sets). I&#39;ve brought up the idea about the latter some time ago on this mailing list. The idea is to remove compact classes to get a larger identityHash (trading memory against speed). After the removal, only two header types are left and hence you gain a spare bit.</blockquote>
<div><br><br>Again, I am trying to understand all this. I read about Compact Classes but still I think I don&#39;t understand them. They are just one world objects ?<br><br>Why you say than removing them we will only use 2 header types instead of 4 ? which ones we will use  and why we wouldn&#39;t use the others 2 ?<br>
<br>In addition, in this book it says:<br><br>&quot;5 bits compact class index, nonzero if the class is in a group of classes known as &quot;Compact Classes&quot;<br><br>I don&#39;t understand these 5 bits and neither if they have sense or not if we remove the compact classes.<br>
 <br>Thank you very much for any help in advance,<br><br>Mariano<br><br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"> I think this shouldn&#39;t be too much work either, but I haven&#39;t come around to implementing it (yet).<br>


<br>
Good luck ;)<br>
<font color="#888888">Adrian<br>
</font><div><div></div><div><br>
On May 4, 2010, at 13:13 , Mariano Martinez Peck wrote:<br>
<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Now...the question is, is there another free bit in the object header ? I<br>
&gt;&gt;&gt; need another one :(<br>
&gt;&gt;<br>
&gt;&gt; Based on the comment at the bottom of Interpreter&gt;&gt;internalIsImmutable:<br>
&gt;&gt; I suspect that somebody else has their eye on that last available bit<br>
&gt;&gt; also ;-)<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt; Yes, I know :(   But for the moment I don&#39;t care to &quot;integrate&quot; my stuff.  I<br>
&gt; just want to play and experiment. And even for that, I need 2 bits :(<br>
&gt; Of course, if I once make something good to integrate, I will have double<br>
&gt; problem :(<br>
&gt;<br>
&gt; So...no solution ?<br>
<br>
</div></div></blockquote></div><br>