Skip to content
0:00 / 0:00

#erlang#beam#jit

Inside the BEAM JIT: How Lukas Backström Made Erlang Faster

BEAM There, Done That

921 subscribers • 17 videos on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • Presented by Lukas Backström, Erlang/OTP team member

Advanced. Deep dive for people who know the field.

694 views3 months ago1 recommendation

Systems programmingProgramming languagesElixir and ErlangCompilers and interpretersPerformance and optimization

Lukas Backström explains the design, challenges, and implementation of the Just-In-Time compiler for the BEAM virtual machine.

In 2021, Erlang got something it had been promised for years: a Just-In-Time compiler. The person who built the first working prototype, spent years on failed experiments before it, and quietly shipped it to every Erlang and Elixir system on the planet is Lukas Backström — OTP team member since 2009, Francesco Cesarini's former student, and one of the most consequential engineers in the ecosystem that most people have never heard of. In this episode, Allen Wyma and Francesco Cesarini sit down with Lucas for a deep dive into how the BEAM JIT actually works, what it took to get there, and where it's heading next. Topics include: the difference between interpreter, ahead-of-time compilation, and JIT — and why the BEAM's threaded code interpreter was already unusually fast why tracing JITs — the first several approaches Lucas's team tried — worked great on microbenchmarks but failed on real Erlang code, which is highly branchy and unpredictable the key insight that killed LLVM: faster code generation with AsmJIT was worth more than LLVM's optimizations, once you account for startup time how the template JIT design — copy-pasting assembly from templates into memory, then specializing a few bits — became the architecture that shipped why WhatsApp was running the JIT from the tip of master the day it was released, nine months before the official OTP 24 tag how type-guided optimizations now flow from the Erlang compiler into the JIT — and why a simple integer add can now compile to a single assembly instruction the Apple M1 announcement that changed the release timeline and forced ARM64 support a year ahead of schedule what's actually left to do: smarter code loading, better startup time, and the native records implementation touching every layer of the system why the BEAM JIT is one of the simpler JITs you could read — and how to inspect the assembly it generates for your own code Recorded May 27, 2026.

Why it's here

1 person recommends this

What people say. Recommended for its deep dive into the engineering behind the BEAM JIT and how type information flows to optimize performance.

u/rtruscain r/elixir • Recommends

…ipped. Five years on, the bigger gains are coming from type information flowing from the Erlang compiler into the JIT. A simple integer add on known small integers now compiles to a single instruction with no type guards. Anyone here run into the JIT being the difference on a production workload, or found cases where it's unexpectedly neutral? [video…