[erlang-questions] clueless performance question

Mike Shaver mike.shaver@REDACTED
Wed Jun 11 13:57:35 CEST 2008


On Tue, Jun 10, 2008 at 8:39 PM, Richard A. O'Keefe <ok@REDACTED> wrote:
> 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.

It's probably[*] going to be less efficient than early binding on
first call, but there's no reason that it can't be equivalent to early
binding on every subsequent call, until a module replacement triggers
the flushing of a JIT cache or what have you.

Work on tracing JITs indicates that the overhead of late binding can
be made to disappear completely in the loops and functions that
comprise virtually all of a program's work -- even in languages that
don't have Erlang's functional goodness to assist the compilers, and
permit mutation of objects in more difficult-to-handle ways than
module reload.

[*] unless you know that a region is going to be hot, and therefore
choose to compile away its binding overhead in the background before
the first call; I hear Erlang is pretty good at parallel operations.
:)

Mike



More information about the erlang-questions mailing list