[Haskell-cafe] Re: [Haskell] [Fwd: Re: Computer Language Shootout]
ndmitchell at gmail.com
Thu Jan 25 19:06:18 EST 2007
> Although there may not be a lot of optimizing Haskell compilers, there are
> compilers for languages similar to Haskell that consistently perform well.
> One could point to O'caml or others in the ML family, or even more
> interesting is the case of Clean, whose syntax heavily borrows from Haskell.
ML is strict, this makes a big difference. Things that Haskell
compilers do easily (inlining) are harder in a strict language. Things
that strict languages do easily (unboxing) are harder in Haskell.
There are enough differences to make it not a "same thing" issue.
Clean on the other hand is just Haskell with a different syntax. The
Hacle project  showed that if you convert Haskell to Clean, you can
sometimes beat the performance of Haskell code.
> What do the Clean folks do that has made their compiler so consistently
> competitive? Is it the abc machine? Frankly I'm amazed that a three stack
> based virtual machine can be translated into such efficient machine code in
> register centric CPU architecture.
The 3 stacks give a nice computational model of unboxed operations.
Maybe this is the thing that allows more effient CPU layout.
> Supposedly someone is working on a Haskell compiler
> that will use the clean compiler back end.
The Clean team are (or were) working on a Haskell front end for Clean.
The Yhc team is working on a Clean back end.
> I can't believe that Clean is so
> fundamentally different, even with uniqueness types, that it has an edge in
> compiler optimization.
Uniqueness types does give some extra optimisation potential, such as
destructive updates if you can guarantee a variable is only referred
to once. But even with that, the language that has impressed me most
on the shootout is Clean. Where the Haskell community spends
significant time they can beat Clean, but generally the Clean does
very well and looks much more idomatic FP than the Haskell.
 google hacle
More information about the Haskell-Cafe