Erlang hints from an CO junkie

James Hague jamesh@REDACTED
Wed Aug 11 21:14:49 CEST 2004

Vlad Balin wrote:

>Not only the functional language, but very
>_slow_ functional language, with boxed
>computations and dynamic typing.

It depends what you are benchmarking against.  If you're looking at popular,
rapid development languages like Python, Ruby, and Perl, then Erlang is
generally much faster across the board.  Only Lua is in the same ballpark.
I'm not talking about specific benchmarks that involve things like regular
expressions--which just call out to a C library--but arbitrary algorithms
and data manipulation.  In fact, I'd say that the standard Erlang
distribution is the fastest implementation of a dynamically typed,
interpreted language that I've seen.  It's fast enough that I don't care
about performance for most applications.

If you're looking at implementations of statically-typed functional
languages that compile to machine code, well, yeah, Erlang is quite a lot
slower.  But I'm not willing to give up quick compile times, an interactive
top-level, the ability to recompile and reload individual modules into a
running program, and a very malleable way of developing programs, in
exchange for more speed, even 50-100x more speed.  After all, look at how
many large projects are now written in *slower* languages like Python and
Ruby.  Mr. Moore is your friend here.

That said, I've still enjoyed the incremental speed improvements from the
Erlang team.  Getting the language right first and then speeding it up is
the correct way to do things.

More information about the erlang-questions mailing list