[Haskell-cafe] GHC optimisations

Adam Langley alangley at gmail.com
Thu Aug 23 18:20:53 EDT 2007


On 8/23/07, Neil Mitchell <ndmitchell at gmail.com> wrote:
> It's not even referentially transparent in all cases. a == b may fail
> while the double's are in the high precision registers, and then
> succeed later on in the program once they are truncated. I think you
> have to specify -fexcess-precision with GHC to get this behaviour.

Also, if you tell GCC to use SSE (there are a number of flags, like
-march and -msse, -msse2 etc which can do this). It can stop using the
80-bit x87 registers for floating point and switch to 64-bit SSE
registers. Then you *don't* get this affect, but I'm not sure you can
be sure that you don't ever get it.

Floating point numbers make me sad :(


AGL

-- 
Adam Langley                                      agl at imperialviolet.org
http://www.imperialviolet.org                       650-283-9641


More information about the Haskell-Cafe mailing list