[Haskell] Comments from Brent Fulgham on Haskell and the shootout
simonmar at microsoft.com
Tue Jun 27 05:44:45 EDT 2006
Brent Fulgham has given me permission to share this message that he sent
to us about his views on Haskell and the Great Computer Language
Shootout. There's some nice advocacy material in here.
I'd like to publicly thank Brent for all his work on the shootout -
benchmarking 50 or so different language implementations and getting any
kind of useful results at all is a significant feat. The shootout
results have also influenced our direction in the Haskell community and
GHC in particular.
Here's the message, for your enjoyment...
-----BEGIN PGP SIGNED MESSAGE-----
Dear Drs. Hudak and Peyton-Jones:
(Feel free to forward these comments to anyone you think would enjoy
A couple of years ago I revived the dormant "Great Computer Language
Shootout" website because I wanted to create an up-to-date comparison
of language implementations to use as ammunition against my nay-
saying coworkers over the state of the art in Computer Science. Back
in those days, I was mainly interested in the performance of
Objective Caml and Lisp, but was also interested in a new (to me)
language called Haskell .
Haskell had (and still has) a beautiful, mathematical notation that
was very easy to read, but it was such a poor performer that I
despaired of ever getting to use it for anything but simple test
programs. While it was conceptually satisfying, pragmatism seemed
destined to keep it on the shelf for the foreseeable future.
I wanted to write to inform you how shocked I was to see the great
advances in performance in the Glorious Haskell Compiler over the
last year or so. Of course, we have also benefited from some great
contributions by the folks on the Haskell-Cafe mailing list.
The thing I find most staggering about the compiler is that its quite
brilliant at identifying wasted work. Many of the original shootout
test cases were written to test the performance of simple scripting
languages, and had grown a set of hacks over the years to keep the
run times large enough to measure as processor speeds improved and
language implementations became more sophisticated. In many cases,
tests involved calculation or large values in loops, which would
cause Perl and Python (and even C, Java, and C++) to chug merrily
away burning cycles so that I could measure the timings in seconds,
rather than microseconds.
Then along came GHC, which began achieving enormous wins over the
other languages because the lazy nature of the evaluation threw out
the unneeded calculations, handing over the final useful result
without breaking a sweat. Consequently, we had to revise many of the
tests to force the programs to perform real work that could not be
avoided, in some cases by forcing intermediate values to be printed
in the solutions so we could be sure the work was actually being
done. With those changes, Haskell began to fall back in speed to
more moderate levels.
However, in the last few releases of GHC (and the last several rounds
of tweaks by the Haskellers on the Cafe list), GHC has risen to the
top of the heap, approaching native C in performance overall. What I
find quite appealing about this is that the performance is consistent
across platforms. While Java's "HotSpot" compiler makes a good
showing on Intel, my AMD test machine yields consistently worse
results than the Pentium IV system. However, GHC performs equally
well on both systems, yielding a similar fractional performance
against C in both cases[1,2].
I think this is great because it means that applications written in
Haskell can be reasonably expected to yield good performance on all
of the common x86 platforms without customizations. Java and several
other languages seem to yield varying performance, probably because
of advanced optimizations available on the Intel platform that have
been hand-coded into those systems.
At any rate, I just wanted to write a quick fan letter about Haskell,
and let you know how impressed I am with its performance. Looks like
it's time for me to start taking a serious look at Haskell for some
real-world problems at work now!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v126.96.36.199 (Darwin)
-----END PGP SIGNATURE-----
More information about the Haskell