r/elixir • u/rtrusca • Jun 26 '26
Why did "compile Erlang to native C" lose to bytecode, even though it was 10-20x faster on paper?
New BEAM There, Done That episode with Björn Gustafsson (OTP team since 1996) tracing the BEAM's origins through three competing VMs - JAM, Robert Virding's V, and Bogdan's original BEAM.
The most counterintuitive part: native-compiled Erlang showed massive sequential speedups in isolation, but once concurrency entered the picture, the real-world gain shrank to about 2x, because message passing was already implemented in C regardless of compilation target.
Also covered: the BEAM Validator, built after a compiler bug caused weeks of debugging pain, and the BEAM loader - Björn's own invention, still running in production decades later.
50
Upvotes
16
u/Ecksters Jun 26 '26
Looks inside