[Haskell-cafe] Can Haskell outperform C++?
ok at cs.otago.ac.nz
Mon May 21 04:17:56 CEST 2012
> How much is hard to port a haskell program to C ?
> If it will become harder and harder, (i.e. for parallelizations) than
> it's fair to choose haskell for performance, but if it's not, I think
> it's hard to think that such a high level language could ever compile
> down to something running faster than its port to C.
There is a logic programming language called Mercury;
it has strict polymorphic types and strict modes and it supports
functional syntax as well as Horn clause syntax. You could think
of it as 'strict Clean with unification'.
In the early days, they had a list processing benchmark where
the idiomatic Mercury version of the program was faster than
the idiomatic C version of the program, despite the fact that
at the time Mercury was compiling via C.
The answer was that the kind of C code being generated by Mercury
was not the kind of code any sane programmer would ever have written
by hand. It really does depend on how you write it.
> Will hardware really go for hundreds of cores ?
You can already buy a >700 core machine (I have _no_ idea how many
chips are involved in that) for Java.
More information about the Haskell-Cafe