The Computer Language Shootout
Ulf Wiger
ulf@REDACTED
Sun Mar 26 17:56:27 CEST 2006
Den 2006-03-26 12:47:52 skrev ke han <ke.han@REDACTED>:
> I would like to solicit a little further input from the erlang community
> that can explain why erlang still performs slower than a few others.
> The most interesting comparisons I would be interested in are to OCaml
> and Java. OCaml since it gets grouped with erlang as functional. Java
> since its a market leader and I have enough experience with Java to
> better understand the rational.
OCaml has very strict static type system. This helps a lot, as no runtime
type checks are necessary.
Java is also statically typed, and allows for destructive update
of data structures. This can help in low-level benchmarks.
Furthermore, Erlang beats the socks off of both in the cheap-
concurrency benchmark:
cpu time N 5,000 10,000 15,000
OCaml 252.56 515.45 757.96
OCaml #2 131.82 263.52 394.79
JDK -server #2 65.74 95.71 194.60
HiPE #2 1.84 3.59 5.18
memory N 5,000 10,000 15,000
JDK -server #2 24,500 27,556 24,500
OCaml 19,072 18,916 19,096
HiPE #2 5,000 4,996 4,996
OCaml #2 4,328 4,332 4,284
(And this is still for small N, as far as Erlang's
concerned...)
Java is not only slow in concurrency benchmarks.
It has a poor concurrency model as well. OCaml
relies on the concurrency support provided by the
underlying operating system, as far as I remember.
For an all-round contender within Erlang's domain,
you might look at Concurrent Haskell. I think Haskell
beats Erlang in expressiveness, and often in speed,
but esp. the support for concurrency and distribution
is somewhat less mature than in Erlang. You should find
more comparative data here:
http://www.cee.hw.ac.uk/~dsg/telecoms/
(at least eventually. Currently, is seems unreachable.)
BR,
Ulf W
--
Ulf Wiger
More information about the erlang-questions
mailing list