[erlang-questions] Erlang vs. Haskell
ok
ok@REDACTED
Tue Jul 3 06:16:36 CEST 2007
On 3 Jul 2007, at 9:08 am, David Mercer wrote:
> However, I was taken aback by the benchmark comparison (http://
> shootout.alioth.debian.org/gp4/benchmark.php?
> test=all&lang=ghc&lang2=hipe), which shows Haskell to perform every
> bit as well as Erlang.
Why do you find this surprising?
Haskell has strong compile-time types;
Erlang does not.
GHC compiles who programs to traditional object programs;
Erlang has to support dynamic reloading of modules.
GHC is a mature heavily optimising compiler;
Erlang's HiPE is younger.
If all you care about is speed, let me recommend Fortran 95.
If you insist on a functional language, Clean used to be faster
than GHC (I don't know if it still is), and the king of
functional speed is O'CAML (which to my mind also wins prizes
for ugliness).
For most things that don't involve concurrency, I would prefer
Haskell myself. But as soon as concurrency or distribution are
involved, Erlang is so much simpler it isn't funny. Yes, I am
aware of the concurrency features supported by some (but by no
means all) Haskell compilers, and I *still* say that it is a
LOT easier to write concurrent code in Erlang.
If the comparison involved some other Haskell compiler, by the way,
such as the hbc or nch98 compilers I often use, I think you would
find Erlang looking a lot better.
> Since Erlang and Haskell seem to have a lot in common, I am now
> wondering if I should instead teach myself Haskell. Now, granted,
> this will be a biased group to ask, but I am curious as to what the
> Erlang community’s take on Haskell’s apparent performance
> superiority is. It seems to me that Erlang as a language seems to
> fit very nicely into my needs, but given Haskell’s similarity and
> superior performance, does anyone have any experience with both who
> could help me in my decision?
>
>
> I have written some prototype modules in Erlang, but have never
> written anything in Haskell, and am wondering whether to stop and
> play around with Haskell some before I continue. Please advise.
> Thank-you.
>
>
> David Mercer
>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
More information about the erlang-questions
mailing list