[Haskell-cafe] Re: proposal: HaBench, a Haskell Benchmark Suite

David Roundy droundy at darcs.net
Sat Jan 27 12:48:39 EST 2007


On Fri, Jan 26, 2007 at 05:25:13PM +0000, Chris Kuklewicz wrote:
> > I agree that common libraries like ByteString need to be well
> > represented, but the original request additionally included programs
> > that are representative of applications. A ray-tracer (even with a fixed
> > scene and only one type of scene primitive) is a fairly nice
> > approximation of a real numerical batch-oriented application while still
> > being small enough to understand and modify. I expect thats why Jo
> > chose it as his benchmark application in the first place.
> 
> Writing numeric code that processes Doubles is hard to optimize.  See the
> shootout example for the n-body problem:

I agree that numerics and Doubles are very important, but am of the opinion
that we'll be better off if we (try to?) restrict ourselves to code that is
really used by someone who really cares about performance enough to
optimize it.  Mostly because if the benchmark suite is going to serve as a
useful guide for compiler optimization writers, it needs to reflect the
performance of code that at least *someone* cares about.

Artificial benchmarks all too often can be improved by artificial
optimizations that only benefit artificial benchmarks.  e.g. the famous
specmark log(sqrt(x)) optimization (which is equal to 0.5*log(x), but no
decent programmer would ever write that code, and it's a special case the
compiler shouldn't bother looking for).
-- 
David Roundy
http://www.darcs.net


More information about the Haskell-Cafe mailing list