[squeak-dev] Re: floats

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[squeak-dev] Re: floats

Nicolas Cellier
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 :

 
 

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 :