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

Jules Bean jules at jellybean.co.uk
Wed Oct 31 10:17:13 EDT 2007

Paulo J. Matos wrote:
> type system? Why is that? Shouldn't type system in fact speed up the
> generated code, since it will know all types at compile time?

The *existence* of a type system is helpful to the compiler.

Peter was referring to the differences between haskell and clean.

Specifically, clean's uniqueness types allow for a certain kind of 
zero-copy mutation optimisation which is much harder for a haskell 
compiler to automatically infer. It's not clear to me that it's actually 
worth it, but I think that's the point at issue. I can *imagine* 
algorithms in which copying is actually faster than mutation, if copying 
gives you better locality.


More information about the Haskell-Cafe mailing list