
19 Oct
2006
19 Oct
'06
3:27 a.m.
ketil+haskell:
"Neil Mitchell"
writes: I want to benchmark GHC vs some other Haskell compilers, what flags should I use?
[...] I guess the answer is "-O2 -fvia-C"?
I tend to use -O2, but haven't really tested it against plain -O.
From what I've seen -fvia-C is sometimes faster, sometimes slower, I tend to cross my fingers and hope the compiler uses sensible defaults on the current architecture.
One thing that IME makes a difference is -funbox-strict-fields. It's probably better to use pragmas for this, though. Another thing to consider is garbage collection RTS flags, those can sometimes make a big difference.
All this and more on the under-publicised Performance wiki, http://haskell.org/haskellwiki/Performance -- Don