[erlang-questions] clueless performance question

Richard A. O'Keefe ok@REDACTED
Wed Jun 11 02:39:50 CEST 2008


On 11 Jun 2008, at 8:27 am, Raoul Duke wrote:
> Erlang excels at concurrency and distribution. What aspects of the
> current Erlang VMs (HiPE and non-HiPE) make them possibly slower for
> serial computation vs. some other well-known VMs?

I can put this very simply indeed:
	early binding => goes faster, much harder to change
	late binding  => goes slower, much easier to change

If you want object oriented extensions to C that have the potential
to go very fast (but thanks to pervasive use of "smart pointers",
will almost certainly go like a slug in treacle), use C++.  C++
requires *major* compiler technology to go at all, let alone fast.

If you want object oriented extensions to C and care much more about
post-delivery extensibility, use Objective-C.  You've got to love
the way things like F-Script (roughly speaking, a Smalltalk dialect)
can just plug into Objective-C and make Mac OS X look like Java on
steroids.  The compiler changes required at least for the first
versions of ObjC were really very small.  An ObjC compiler has much
less type information to exploit, and practically everything (even,
as a matter of factor, the dynamic dispatch function!) can be changed.

Erlang is designed to support hot loading, the post-delivery
replacement/upgrade of modules.  That means late binding, which is
*always* going to be less efficient than early binding.

Of course, efficiency is not just a matter of micro-level language
efficiency.  It's a matter of algorithmic choice, and of system
level design.  And what really counts in practice is how well the
system does what you want it to do NOW, not what you wanted it to
do last year when the interfaces were frozen.




More information about the erlang-questions mailing list