Hi Philipe,<br><br><div class="gmail_quote">On Mon, Mar 16, 2009 at 10:52 PM, Philippe Marschall <span dir="ltr">&lt;<a href="mailto:philippe.marschall@gmail.com">philippe.marschall@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">2009/3/16 Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt;:<br>
&gt;<br>
&gt;<br>
&gt; On Mon, Mar 16, 2009 at 2:15 PM, Philippe Marschall<br>
&gt; &lt;<a href="mailto:philippe.marschall@gmail.com">philippe.marschall@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; 2009/3/16 Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt;:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; On Sun, Mar 15, 2009 at 1:57 PM, Nicolas Cellier<br>
&gt;&gt; &gt; &lt;<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; 2009/3/15 Hans-Martin Mosner &lt;<a href="mailto:hmm@heeg.de">hmm@heeg.de</a>&gt;<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; nicolas cellier schrieb:<br>
&gt;&gt; &gt;&gt;&gt; &gt; Hans,<br>
&gt;&gt; &gt;&gt;&gt; &gt; Tagging/untagging could be very fast! See my other post<br>
&gt;&gt; &gt;&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;&gt; &gt; 1) UnTagging a double= No op<br>
&gt;&gt; &gt;&gt;&gt; &gt; 2) Tagging a double= a isnan test (so as to have a representable nan<br>
&gt;&gt; &gt;&gt;&gt; &gt; in Smalltalk)<br>
&gt;&gt; &gt;&gt;&gt; &gt; 3) This trick does not had any extra cost to tagging/untagging of<br>
&gt;&gt; &gt;&gt;&gt; &gt; other oops<br>
&gt;&gt; &gt;&gt;&gt; That&#39;s true for a 64-bit processor, and on such hardware I see the<br>
&gt;&gt; &gt;&gt;&gt; advantages of this scheme.<br>
&gt;&gt; &gt;&gt;&gt; For 32-bit hardware, it won&#39;t work.<br>
&gt;&gt; &gt;&gt;&gt; Hopefully we&#39;ll all have suitable hardware in the near future...<br>
&gt;&gt; &gt;&gt;&gt; But for example, I&#39;m running 32-bit linux here on my 64-bit AMD<br>
&gt;&gt; &gt;&gt;&gt; processor just because the WLAN card I&#39;m using only has a 32-bit<br>
&gt;&gt; &gt;&gt;&gt; Windows<br>
&gt;&gt; &gt;&gt;&gt; driver, and ndiswrapper on 64-bit linux would require a 64-bit driver<br>
&gt;&gt; &gt;&gt;&gt; to<br>
&gt;&gt; &gt;&gt;&gt; work correctly (which is somewhat stupid IMHO but I&#39;m not going to<br>
&gt;&gt; &gt;&gt;&gt; hack<br>
&gt;&gt; &gt;&gt;&gt; ndiswrapper).<br>
&gt;&gt; &gt;&gt;&gt; In the real world, there are tons of silly constraints like this which<br>
&gt;&gt; &gt;&gt;&gt; still prevent people from fully using 64-bit hardware.<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; Cheers,<br>
&gt;&gt; &gt;&gt;&gt; Hans-Martin<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Of course, most of the nice properties come from the 64 bits<br>
&gt;&gt; &gt;&gt; adressing...<br>
&gt;&gt; &gt;&gt; Hey, wait, I don&#39;t even have a 64 processor in my house!<br>
&gt;&gt; &gt;&gt; For the fun I imagine we could emulate by spanning each oop over two<br>
&gt;&gt; &gt;&gt; int32<br>
&gt;&gt; &gt;&gt; typedef struct {int32 high,low;} oop;<br>
&gt;&gt; &gt;&gt; I would expect a slower VM by roughly a factor 2 - except for double<br>
&gt;&gt; &gt;&gt; arithmetic...<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; In theory, but only for memory-limited symbolic applications.  If you<br>
&gt;&gt; &gt; have<br>
&gt;&gt; &gt; an application that fits entirely in cache then I would expect parity.<br>
&gt;&gt; &gt;  The<br>
&gt;&gt; &gt; argument for symbolic applications is that a 64-bit symbolic app has to<br>
&gt;&gt; &gt; move<br>
&gt;&gt; &gt; twice the data as a 32-bit symbolic app because each symbolic object is<br>
&gt;&gt; &gt; twice the size.<br>
&gt;&gt;<br>
&gt;&gt; Couldn&#39;t you compress the oops? AFAIK HotSpot was the last remaining<br>
&gt;&gt; JVM that got this.<br>
&gt;<br>
&gt; I don&#39;t see the point.  Memory is cheap, getting cheaper.<br>
<br>
</div></div>But memory access isn&#39;t.<br>
<div class="im"><br>
&gt; 64-bits means<br>
&gt; extremely cheap address space.  Why slow down the critical path to save<br>
&gt; space?<br>
<br>
</div>Because it&#39;s faster (because you have to move around fewer data) an<br>
gets you closer to 32bit speed.<br>
<br>
<a href="http://wikis.sun.com/display/HotSpotInternals/CompressedOops" target="_blank">http://wikis.sun.com/display/HotSpotInternals/CompressedOops</a><br>
<a href="http://blog.juma.me.uk/2008/10/14/32-bit-or-64-bit-jvm-how-about-a-hybrid/#comments" target="_blank">http://blog.juma.me.uk/2008/10/14/32-bit-or-64-bit-jvm-how-about-a-hybrid/#comments</a><br>
<a href="http://www.lowtek.ca/roo/2008/java-performance-in-64bit-land/" target="_blank">http://www.lowtek.ca/roo/2008/java-performance-in-64bit-land/</a><br>
<a href="http://www.devwebsphere.com/devwebsphere/2008/10/websphere-nd-70.html" target="_blank">http://www.devwebsphere.com/devwebsphere/2008/10/websphere-nd-70.html</a><br>
<a href="http://webspherecommunity.blogspot.com/2008/10/64-bit-performance-thoughputmemory.html" target="_blank">http://webspherecommunity.blogspot.com/2008/10/64-bit-performance-thoughputmemory.html</a><br></blockquote>
<div><br></div><div>OK, and this is a reasonable stop-gap until machines catch up with the potential of the 64-bit address space.  It reminds me of segmented approaches to 16-bit limits on PDP-11s, 8086s et al.  Basically these guys are scaling 32-bit oops by 8, allowing a maximum heap size of 32Gb and 4G small objects.  There are other approaches like using an indirection table for intra-segment object references and using 32-bit oops within a segment, which would fit well with a Train algorithm.</div>
<div><br></div><div>My gut feels like these stop gaps are a temporary thing.  After all if speed was so compelling we&#39;d see lots of small 16-bit apps in places like Windows where there used to be good support for 16-bit code until quite recently.  But in fact 16-bit apps have died the death and we favour the regularity of 32-bit code.  Somewhat analogously Smalltalk trades perofrmance for regularity.  So I don&#39;t find these approaches particularly compelling.  In any case they require engineering teams that can afford to support multiple memory models in the VM, something I&#39;m not going to assume in Cog :)</div>
<div><br></div><div>Thanks for the links.</div><div><br></div><div>Best</div><div>Eliot<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Cheers<br>
<font color="#888888">Philippe<br>
<br>
</font></blockquote></div><br>