Erlang Is Seeing Work On "BeamAsm" - A JIT Compiler Yielding Much Performance Uplift
Written by Michael Larabel in Programming on 13 September 2020 at 07:00 AM EDT. 4 Comments
PROGRAMMING --
Lukas Larsson of Erlang Solutions is proposing "BeamAsm" as a JIT compiler for the Erlang virtual machine.

Erlang/OTP could soon be the latest programming language featuring a just-in-time compiler. With BeamAsm, Erlang instructions are turned into native code on x86-64 making use of ASMJIT. While at the moment only x86-64 is working, support for ARM 64-bit is also in the works.

The performance results with BeamAsm for JIT'ing Erlang are quite impressive:
For example, the number of Estones as computed by the estone benchmark suite becomes about 50% larger, meaning about 50% more work can be done during the same time period. Individual benchmarks within the estone benchmark suite vary from a 170% increase (pattern matching) to no change at all (huge messages). So, not surprising, computation heavy workload can show quite a large gain, while communication heavy workloads remain about the same.

If we run the JSON benchmarks found in the Poison or Jason, BeamAsm achieves anything from 30% to 130% increase (average at about 70%) in the number of iterations per second for all Erlang/Elixir implementations. For some benchmarks, BeamAsm is even faster than the pure C implementation jiffy.

More complex applications tend to see a more moderate performance increase, for instance, RabbitMQ is able to handle 30% to 50% more messages per second depending on the scenario.

While having the potential of being much faster, the jIT'ed Erlang uses more system memory (around 10%) compared to its traditional interpreter.

More details on the BeamAsm just-in-time support via this pull request.
Related News
About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter or contacted via MichaelLarabel.com.

Popular News This Week