Show Your Support: Did you know that the hundreds of articles written on Phoronix each month are mostly authored by one individual? Phoronix.com doesn't have a whole news room with unlimited resources and relies upon people reading our content without blocking ads and alternatively by people subscribing to Phoronix Premium for our ad-free service with other extra features.
Erlang Is Seeing Work On "BeamAsm" - A JIT Compiler Yielding Much Performance Uplift
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.