[erlang-questions] clueless performance question

Thomas Lindgren <>
Wed Jun 11 01:06:23 CEST 2008


--- Christian S <> wrote:
> I would find research into what can be won by doing
> JIT interesting,
> things like avoiding external-call lookups by
> compiling it into a
> direct call (constraint it so it needs to be re-done
> when modules are
> replaced).

I think both Hipe and Beam already link calls when
modules are loaded. At least they used to do that.

Part of the 'problem' (one view is that it's a good
thing) is that builtins begin to dominate execution,
and those are mostly out of the compiler's reach
today. For instance, you may basically be spending
your time inside the loops implementing ets operations
or suchlike. Hipe can't help you there.

Another problem is that all the sophisticated
optimizations tend to yield little extra performance
on real programs (ie, big nasty sprawling messes of
code rather than neat inner loops). For whatever
reasons; for instance, native code is nominally faster
than bytecode but causes more cache misses with a
large working set, so it evens out ... This experience
is fairly common across the spectrum of programming
languages. Worse, nowadays users want stuff like
reliability and tracing :-)

Nevertheless, I think there's plenty more performance
on the table. It's just difficult to get at it.

And finally, it's not like we're standing still. I
measured the performance between OTP releases a few
years back, running the same code on the same
hardware, and found that Beam had improved by about
30% over time on my benchmarks. That's not bad.

Best,
Thomas





      



More information about the erlang-questions mailing list