
Hi all. Some days ago someone posted this url: http://www.bagley.org/~doug/shootout/ which is a page benchmarking a number of different languages and compilers where ghc is one of them. Some benchmarks lacked a haskell versions (and some still do) and so I decided to fill in some of the gaps. One benchmark turned out to give pretty remarkable results. It's the producer/consumer benchmark. I suggest you all take a look at it. The haskell version is six (SIX!!!) times faster than the c version. Hey, what's going on here? I would really like to hear some comments from our dear implementors. It should be noted that synchronisation is achieved by using slightly different kinds of primitives. But still... six times... I lift my hat of for the ghc-implementors. /Josef

I notice that the reverse file program, while concise, is quite slow. The program in its entirety is: main = interact $ unlines . reverse . lines Any thoughts on why its time is 5.68 seconds, vs 3.56 for tcl, 2 for perl, 0.19 for gcc, 0.18 for ocaml; and how it might be sped up? Is the lack of speed all in the stdio I/O? Is there a way to tell which benchmarks have no haskell entry? John Atwood -- Josef Svenningsson wrote:
Hi all.
Some days ago someone posted this url: http://www.bagley.org/~doug/shootout/
which is a page benchmarking a number of different languages and compilers where ghc is one of them. Some benchmarks lacked a haskell versions (and some still do) and so I decided to fill in some of the gaps.
One benchmark turned out to give pretty remarkable results. It's the producer/consumer benchmark. I suggest you all take a look at it. The haskell version is six (SIX!!!) times faster than the c version. Hey, what's going on here? I would really like to hear some comments from our dear implementors.
It should be noted that synchronisation is achieved by using slightly different kinds of primitives. But still... six times...
I lift my hat of for the ghc-implementors.
/Josef
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
participants (2)
-
John Atwood
-
Josef Svenningsson