On 15.01.2010 09:00, Seebs wrote:
> On 2010-01-15, Phillip Gawlowski<pg / thimian.com>  wrote:
>> You'll loose time when computing with Floats, anyway, since outside of
>> vector-based CPUs (IIRC), the performance of performing maths on floats
>> is terrible (in relative terms).
>
> This is nowhere near as true as it used to be.  Some quickie tests on an x86
> revealed that, for some common operations, floating point math was FASTER than
> integer!  It depends a lot on what you're trying to do.  Since modernish CPUs
> may well be able to do both float and integer operations simultaneously, an
> integer loop of floating point operations may be very fast...

Possibly. If the multi-core nature of today's processors lends itself to 
crunching Floats well, the issue is becoming somewhat moot indeed.

To be honest, though, I'm personally not that worried about 
computational performance in that area.

And if Ruby is the bottle neck, it'd be possible to drop down to C, and 
write an extension to handle the Float operations (or drop Ruby 
entirely, if speed of computation is more important than speed of 
development, for example).

--
Phillip Gawlowski