[Haskell-cafe] benchmarking c/c++ and haskell

David Terei dave.terei at gmail.com
Tue Sep 14 20:50:15 EDT 2010

On 13 September 2010 20:41, Vo Minh Thu <noteed at gmail.com> wrote:
> ... the post is from 2008. No LLVM goodness. So I thought GHC 6.12.1
> (not the latest and greatest HEAD) would be enough.

I compiled the two programs myself out of curiosity and got the following times.

Linux, 64bit, Ubuntu 10.10:

clang: 0.180s
gcc: 0.179s
ghc 6.12.1 (viac): 0.187s
ghc 6.12.1 (fasm): 0.218s
ghc HEAD (viac): 0.186s
ghc HEAD (fasm): 0.179s
ghc HEAD (llvm): 0.174s

clang: 1.657s
gcc: 1.647s
ghc 6.12.1 (viac): 1.653s
ghc 6.12.1 (fasm): 1.975s
ghc HEAD (viac): 1.648s
ghc HEAD (fasm): 1.658s
ghc HEAD (llvm): 1.646s

So basically all have the same time except ghc 6.12.1 where fasm is a
little slow.

On windows xp 32bit I get quite different results which I trust less
as the times are jumping around much more then they were on linux:

gcc: 0.365s
ghc 6.12.1 (viac): 5.287s
ghc 6.12.1 (fasm): 1.332s
ghc HEAD (viac): 5.292s
ghc HEAD (fasm): 0.875s
ghc HEAD (llvm): 0.359s

Not sure why the results on windows are so different. If anyone else
wants to run the two programs on Windows and check that would be


More information about the Haskell-Cafe mailing list