[Haskell-cafe] benchmarking c/c++ and haskell
Daniel Fischer
daniel.is.fischer at web.de
Mon Sep 13 06:28:43 EDT 2010
On Monday 13 September 2010 11:50:14, Vo Minh Thu wrote:
> 2010/9/13 David Virebayre <dav.vire+haskell at gmail.com>:
> > Does it help to compile with ghc --make -O2 -funbox-strict-fields ??
>
> No, it doesn't. Can I assume you don't have the problem I described?
Currently, GHC's native code generator is not too good at optimising loops.
It might help if you compile via C,
ghc -O2 -fexcess-precision -fvia-C -optc-O3
On my box, that gives a > 2× speedup (unfortunately, that means it takes
almost three times as long as the C version instead of > 6×).
If you have the llvm backend for GHC, that is supposedly better for such
code.
>
> Thanks,
> Thu
More information about the Haskell-Cafe
mailing list