Hans,<br>Tagging/untagging could be very fast! See my other post<br><br>1) UnTagging a double= No op<br>2) Tagging a double= a isnan test (so as to have a representable nan in Smalltalk)<br>3) This trick does not had any extra cost to tagging/untagging of other oops<br><br>What about the cost of allocating double?<br>Of course, you won't reach speed of optimized compiled code using FPU extensively.<br>BUT you remove the main cost of Smalltalk number crunching: pressure on Objectmemory garbage collector!<br><br>
<div style="margin: 0px 2px; padding-top: 1px;    background-color: #c3d9ff; font-size: 1px !important;    line-height: 0px !important;">&nbsp;</div>
<div style="margin: 0px 1px; padding-top: 1px;    background-color: #c3d9ff; font-size: 1px !important;    line-height: 0px !important;">&nbsp;</div>
<div style="padding: 4px; background-color: #c3d9ff;"><h3 style="margin:0px 3px;font-family:sans-serif">Envoyé par nicolas cellier via Google Reader :</h3></div>
<div style="margin: 0px 1px; padding-top: 1px;    background-color: #c3d9ff; font-size: 1px !important;    line-height: 0px !important;">&nbsp;</div>
<div style="margin: 0px 2px; padding-top: 1px;    background-color: #c3d9ff; font-size: 1px !important;    line-height: 0px !important;">&nbsp;</div>
<div style="font-family:sans-serif;overflow:auto;width:100%;margin: 0px 10px"><h2 style="margin: 0.25em 0 0 0"><div class=""><a href="http://permalink.gmane.org/gmane.comp.lang.smalltalk.squeak.general/132694">Re: floats</a></div></h2>
<div style="margin-bottom: 0.5em">via <a href="http://blog.gmane.org/gmane.comp.lang.smalltalk.squeak.general" class="f">gmane.comp.lang.smalltalk.squeak.general</a> de Hans-Martin Mosner le 15/03/09</div><br style="display:none">
<pre>Jecel Assumpcao Jr schrieb:
That does not work since xxx10 is used as a sentinel value in the
garbage collector.
I think a better approach is to handle floats specially in a JIT, and
keep them unboxed for typical sequences of arithmetic manipulation
within methods.
Of course, using immediate floats does avoid the object creation and
destruction overhead, but you still have some overhead for tagging and
untagging, which on modern architectures is still much higher than the
actual floating point operation costs.

Cheers,
Hans-Martin


</pre></div>
<br>
<div style="margin: 0px 2px; padding-top: 1px;    background-color: #c3d9ff; font-size: 1px !important;    line-height: 0px !important;">&nbsp;</div>
<div style="margin: 0px 1px; padding-top: 1px;    background-color: #c3d9ff; font-size: 1px !important;    line-height: 0px !important;">&nbsp;</div>
<div style="padding: 4px; background-color: #c3d9ff;"><h3 style="margin:0px 3px;font-family:sans-serif">Ce que vous pouvez faire à partir de cette page :</h3>
<ul style="font-family:sans-serif"><li><a href="http://www.google.com/reader/view/feed%2Fhttp%3A%2F%2Frss.gmane.org%2Fmessages%2Fcomplete%2Fgmane.comp.lang.smalltalk.squeak.general?source=email">Vous abonner à gmane.comp.lang.smalltalk.squeak.general</a> à l'aide de <b>Google Reader</b></li>
<li>Suivre l'actualité de <b>tous vos sites favoris</b> avec <a href="http://www.google.com/reader/?source=email">Google Reader</a></li></ul></div>
<div style="margin: 0px 1px; padding-top: 1px;    background-color: #c3d9ff; font-size: 1px !important;    line-height: 0px !important;">&nbsp;</div>
<div style="margin: 0px 2px; padding-top: 1px;    background-color: #c3d9ff; font-size: 1px !important;    line-height: 0px !important;">&nbsp;</div>