[squeak-dev] Re: floats

nicolas cellier nicolas.cellier.aka.nice at gmail.com
Sun Mar 15 11:45:23 UTC 2009


Ralph, integer operations would not necessarily be slower... See my
other post.

1) with 64bits you have native int32 support (better than 30 and no
shift required!)
2) if you store in low 32bits of mantissa you have good 4-byte
alignment properties
3) the isSmallIntegerOop test would be just as cheap (compare 32 high
bits of oop with a specialy crafted tag combining both NanTag and
SmallInteger tag)
4) conversions are int32<->oop would be cheap too

Envoyé par nicolas cellier via Google Reader : Re: floats via
gmane.comp.lang.smalltalk.squeak.general de Ralph Johnson le 15/03/09
It depends. They are extremely important for scientific computing, they
are not nearly as important elsewhere. Most language implementors
ignore scientific computing, which is why Fortran still gets used so
much. I think it would be reasonable to have an implementation of
Smalltalk that focused on making floating point numbers fast and made
integer arithmetic slower. For nearly everything that Smalltalk gets
used for now, it would be slower than the current apparoch to optimize
integer arithmetic. But for real scientific computation, it would be
faster. -Ralph
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/cb8f89e0/attachment.htm


More information about the Squeak-dev mailing list