[Haskell-cafe] Climbing up the shootout...

Bulat Ziganshin bulat.ziganshin at gmail.com
Mon Sep 22 08:07:59 EDT 2008

Hello Manlio,

Monday, September 22, 2008, 1:46:55 PM, you wrote:

> This is cheating, IMHO.
> Some test comparisons are unfair.

this overall test is uselles for speed comparison. afair, there are
only 2-3 programs whose speed isn't heavily depend on libraries. in
DNA test, for example, Tcl (or PHP?) was leader just because it has
better regexp library

to make things even funnier, this test allows to use libs bundled to
compiler, but not 3rd-arty ones. so ghc (not Haskell!) what includes
more built-in libs than gcc looks like a leader. of course, noone uses
bare ghc or gcc in real world

even benchamrks that test pure speed of compiled code are useless

1) they are imited by RAM speed, not speed of code itself
2) there uis a fashion in Haskell world to write for shootout in the
very low-level style, which isn't actually used in real programming
and actually understood only by a few "wizards" developing
high-performance haskell code

so actually that this shootout shows is that
1) in real world, program speed more depends on libs that on
compilers. if you go to compare weak language plus lot of libs with a
strong language with a few libs first variant will win (unless you go
to reimplement all these libs at your own)

2) highly-optimized Haskell code is only 2-3 times slower than real C
code produces by average C programmer. taken into account that such
Haskell code is written many times slower than C one and need much
more knowledge, Haskell hardly can be compared to C

3) if you need to compare real-world Haskell code with C one, you may
look at these papers:

An approach to fast arrays in Haskell

Rewriting Haskell Strings

that they call "naive approach" is real Haskell programs not speeded
up by special libs

Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com

More information about the Haskell-Cafe mailing list