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.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Philip Armstrong
Sent: Thursday, June 21, 2007 1:36 PM
To: [email protected]; Sebastian Sylvan
Subject: Re: [Haskell-cafe] Haskell version of ray tracer code is much
slower than the original ML

On Thu, Jun 21, 2007 at 12:25:44PM +0100, Sebastian Sylvan wrote:
>Try using floats for the vector, and strict fields (add a ! to the
>fields in the data declaration).

Because the optimisation page on the haskell wiki is very explicit
about never using Float when you can use Double, that's why. An older
revision used Float and it was slower than the current one. Making the
datatypes strict also makes no difference.

I have tried the obvious things :)

>That's the simplest possible thing I can think of after about two
>seconds of looking anyway. It appears that the ML version uses float
>so I don't understand why you would use Double for the Haskell version
>at all, and then think you could do any sort of valid comparisons
>between them...

OCaML floats are Doubles, at least on x86.

cheers, Phil

-- 
http://www.kantaka.co.uk/ .oOo. public key: http://www.kantaka.co.uk/gpg.txt
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to