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

2010-09-16 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 9/15/10 06:41 , Daniel Fischer wrote: > play a role. Since ghc fares pretty well on 64-bit linux (David Terei and > Don), both, via the NCG and via C, it seems its 64-bit code generator is > better than its 32-bit code generator :( amd64 has more

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

2010-09-15 Thread Daniel Fischer
On Wednesday 15 September 2010 12:22:24, Vo Minh Thu wrote: > Thanks all for your answsers. I still wonder why some people get very > different results between gcc and ghc, and some others don't. A > difference in processor? Architecture (32/64-bit, x86/..., ...), processor, gcc version, OS, all

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

2010-09-15 Thread Vo Minh Thu
Thanks all for your answsers. I still wonder why some people get very different results between gcc and ghc, and some others don't. A difference in processor? I guess I will crank up a little package using criterion and producing two executables to make sure anyone who run the benchmark use the sa

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

2010-09-15 Thread Daniel Fischer
On Wednesday 15 September 2010 02:50:15, David Terei wrote: > On 13 September 2010 20:41, Vo Minh Thu 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

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

2010-09-14 Thread Jason Dagit
On Tue, Sep 14, 2010 at 5:50 PM, David Terei wrote: > On 13 September 2010 20:41, Vo Minh Thu 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 f

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

2010-09-14 Thread David Terei
On 13 September 2010 20:41, Vo Minh Thu 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: 1e8 clang: 0.1

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

2010-09-13 Thread Vo Minh Thu
2010/9/13 Daniel Fischer : > On Monday 13 September 2010 11:50:14, Vo Minh Thu wrote: >> 2010/9/13 David Virebayre : >> > 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

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

2010-09-13 Thread Daniel Fischer
On Monday 13 September 2010 11:50:14, Vo Minh Thu wrote: > 2010/9/13 David Virebayre : > > 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 optimi

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

2010-09-13 Thread Vo Minh Thu
2010/9/13 David Virebayre : > 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? Thanks, Thu ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskel

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

2010-09-13 Thread David Virebayre
Does it help to compile with ghc --make -O2 -funbox-strict-fields ?? David. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

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

2010-09-12 Thread Vo Minh Thu
2010/9/12 Andrew Coppin : > Vo Minh Thu wrote: >> >> Hi, >> >> I would like to benchmark C/C++ and Haskell code. The goal is to >> improve the Haskell port[0] of smallpt[1]. >> >> To make sure my approach was reliable, I got the code of two programs >> (one in C, the other in Haskell) from a post[2

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

2010-09-12 Thread Andrew Coppin
Vo Minh Thu wrote: Hi, I would like to benchmark C/C++ and Haskell code. The goal is to improve the Haskell port[0] of smallpt[1]. To make sure my approach was reliable, I got the code of two programs (one in C, the other in Haskell) from a post[2] by Don. The code is reproduced below. When tim

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

2010-09-12 Thread Vo Minh Thu
Hi, I would like to benchmark C/C++ and Haskell code. The goal is to improve the Haskell port[0] of smallpt[1]. To make sure my approach was reliable, I got the code of two programs (one in C, the other in Haskell) from a post[2] by Don. The code is reproduced below. When timing the execution of