WordPtr,IntPtr,IntMax,WordMax

Simon Marlow simonmarhaskell at gmail.com
Thu May 11 09:57:30 EDT 2006


Ben Rudiak-Gould wrote:
> John Meacham wrote:
> 
>> also, incidentally, for anyone on x86 that cares about math performance,
>> use -optc-fsse2 to make it use the much nicer math coprocessor available
>> on modern x86 cpus.
> 
> I object to its characterization as "nicer". It's faster, but *lower 
> precision*. It worries me that people are so blithely abandoning those 
> extra bits in the name of speed. A few years from now there's going to 
> be an expensive engineering failure, and months of investigation will 
> reveal that it was because a math library was compiled for SSE2. Be 
> careful out there.

On the other hand, keeping intermediate Doubles to 80-bit precision is 
both (a) non-portable and (b) unpredictable (the programmer doesn't know 
which intermediates are going to be stored in 80 bits, and turning on 
optimisation will probably make a difference).

I suppose you might argue that "extra precision is always good".  But I 
like it when Haskell programs give the same results, regardless of the 
platform, compilation strategy, and level of optimisation.

> (And while I'm on the subject, Haskell should have a LongDouble type.)

LongDouble would be fine, but storing intermediate Doubles in 80 bits is 
bad.

Cheers,
	Simon


More information about the Glasgow-haskell-users mailing list