[squeak-dev] Re: floats

nicolas cellier nicolas.cellier.aka.nice at gmail.com
Sun Mar 15 11:53:08 UTC 2009


Hans,
Tagging/untagging could be very fast! See my other post

1) UnTagging a double= No op
2) Tagging a double= a isnan test (so as to have a representable nan in
Smalltalk)
3) This trick does not had any extra cost to tagging/untagging of other
oops

What about the cost of allocating double?
Of course, you won't reach speed of optimized compiled code using FPU
extensively.
BUT you remove the main cost of Smalltalk number crunching: pressure on
Objectmemory garbage collector!

Envoyé par nicolas cellier via Google Reader : Re: floats via
gmane.comp.lang.smalltalk.squeak.general de Hans-Martin Mosner le
15/03/09 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
Ce que vous pouvez faire à partir de cette page :
- Vous abonner à gmane.comp.lang.smalltalk.squeak.general à l'aide de
Google Reader
- Suivre l'actualité de tous vos sites favoris avec Google Reader
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20090315/7f928648/attachment.htm


More information about the Squeak-dev mailing list