[Haskell-cafe] Re: Why can't Haskell be faster?

Dan Piponi dpiponi at gmail.com
Wed Oct 31 16:58:52 EDT 2007


On 10/31/07, Neil Mitchell <ndmitchell at gmail.com> wrote:
> in the long run Haskell should be aiming for equivalence with highly
> optimised C.

Really, that's not very ambitious. Haskell should be setting its
sights higher. :-)

When I first started reading about Haskell I misunderstood what
currying was all about. I thought that if you provided one argument to
a two argument function, say, then it'd do partial evaluation. Very I
soon I was sorely let down as I discovered that it simply made a
closure that waits for the second argument to arrive so the reduction
can be carried out.

But every day, while coding at work (in C++), I see situations where
true partial evaluation would give a big performance payoff, and yet
there are so few languages that natively support it. Of course it
would require part of the compiler to be present in the runtime. But
by generating code in inner loops specialised to the data at hand it
could easily outperform C code in a wide variety of real world code. I
know there has been some research in this area, and some commercial
C++ products for partial evaluation have appeared, so I'd love to see
it in an easy to use Haskell form one day.

Just dreaming, I know...
--
Dan


More information about the Haskell-Cafe mailing list