[Haskell-cafe] Haskell version of ray tracer code is
muchslowerthan the original ML
claus.reinke at talk21.com
Sat Jun 23 07:05:01 EDT 2007
>>try making ray_sphere and intersect' local to intersect,
>>then drop their constant ray parameter. saves me 25%.
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?).
-------------- next part --------------
A non-text attachment was scrubbed...
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