[Shootout-list] Re: haskell optimization trend

Aaron Denney wnoise@ofb.net
Sat, 23 Oct 2004 21:35:48 +0000 (UTC)


On 2004-10-23, Jean-Philippe Bernardy <JeanPhilippe.bernardy@gmail.com> wrote:
> Hello everyone,
>
> I've checked the evolution of the haskell benchmark implementations,
> and I have to say that I'm disapointed.
>
> Let's take an example: word count.
>
> It used to be:
>
> -----------------------
6 lines
> -------------------
> and it has become... (don't bother to go into the details)
> ----------------
50 lines
> --------------
>
> The difference? I belive it's 100 times faster. Cool huh? Perhaps, yet
> it doesn't do justice to the haskell language (and in turn to ghc).
> Why? Because no sane programmer would ever consider writing the
> optimized version! (except for the fun of it) It might be much faster
> than the short one, but it is still much slower than C implementation,
> requires MUCH more thought to write and read than the short one, and
> is less modular.
...
> Yet, you might argue that the purpose of the benchmark is to write the
> most optimal program, whatever the cost. Fine, but the size (LOC) of
> the implementations are benchmarked too... Leading to a conflict.
> Thus, I propose to fork the haskell benchmarks as such:
>
>  1. Crazy hacker haskell
>  2. Academic haskell
>
> This would allow to push the language to its limits in each direction,
> without interference. An additional benefit is that it would point to
> optimization opportunities in the compiler.
>
> What do you think?

Do we offer this same opportunity to the other languages?  The goal of
the shootout is neither Haskell advocacy nor improving Haskell compilers.

You're right that the current version does not give a good impression of
idiomatic Haskell.  There are much shorter versions (shown both here and
on the Haskell lists) than the current one that are perhaps only 3 times
as slow, and should be considered.

-- 
Aaron Denney
-><-