[Haskell-cafe] Re: Haskell version of ray tracer code is much slower than the original ML

Simon Marlow simonmarhaskell at gmail.com
Fri Jun 22 08:19:45 EDT 2007


Philip Armstrong wrote:
> On Thu, Jun 21, 2007 at 08:15:36PM +0200, peterv wrote:
>> So float math in *slower* than double math in Haskell? That is 
>> interesting.
>> Why is that?   
>>
>> BTW, does Haskell support 80-bit "long double"s? The Intel CPU seems 
>> to use
>> that format internally.
> 
> As I understand things, that is the effect of using -fexcess-precision.
> 
> Obviously this means that the behaviour of your program can change
> with seemingly trivial code rearrangements,

Not just code rearrangements: your program will give different results depending 
on the optimisation settings, whether you compile with -fvia-C or -fasm, and the 
results will be different from those on a machine using fixed 32-bit or 64-bit 
precision floating point operations.

Cheers,
	Simon



More information about the Haskell-Cafe mailing list