[Haskell-cafe] Help optimize fannkuch program

Bryan O'Sullivan bos at serpentine.com
Mon Dec 3 09:01:32 CET 2012


On Sun, Dec 2, 2012 at 3:12 PM, Branimir Maksimovic <bmaxa at hotmail.com>wrote:

> Well, playing with Haskell I have literally trasnlated my c++ program
>
> http://shootout.alioth.debian.org/u64q/program.php?test=fannkuchredux&lang=gpp&id=3
> and got decent performance but not that good in comparison
> with c++
> On my machine Haskell runs 52 secs while c++ 30 secs.
>

Did you compile with -O2 -fllvm?

On my machine:

C++ 28 sec
Mine -O2 -fllvm 37 sec
Yours -O2 -fllvm 41 sec
Mine -O2 48 sec
Yours -O2 54 sec

My version of your Haskell code is here: http://hpaste.org/78705
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20121203/bbad225e/attachment.htm>


More information about the Haskell-Cafe mailing list