[Haskell-cafe] Haskell version of ray tracer code is
muchslowerthan the original ML
Claus Reinke
claus.reinke at talk21.com
Sat Jun 23 07:05:01 EDT 2007
>>>http://www.kantaka.co.uk/darcs/ray
>>
>>try making ray_sphere and intersect' local to intersect,
>>then drop their constant ray parameter. saves me 25%.
>>claus
also try replacing that (foldl' intersect') with (foldr (flip intersect'))!
using a recent ghc head instead of ghc-6.6.1 also seems to
make a drastic difference (wild guess, seeing the unroll 1000
for ocaml: has there been a change to default unrolling in ghc?).
claus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Ray1.hs
Type: application/octet-stream
Size: 2978 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20070623/69bdcac9/Ray1.obj
More information about the Haskell-Cafe
mailing list