Issue 012

Erlang/OTP 26 Highlights

What Elixir Developers Need to Know

May 16, 2023 · 3 minute read

Erlang/OTP 26 has arrived, and it brings a plethora of new features and improvements that Elixir developers can benefit from. You can find the original blog post here but I've summarised some of the most exciting highlights that are particularly relevant to Elixir developers below.

1. Shell Improvements: Enhanced Auto-Completion

One of the most significant enhancements in Erlang/OTP 26 is the improved auto-completion feature in the shell. This improvement makes it easier for developers to work with variables, record names, record fields names, map keys, function parameter types, and file names. With this update, developers can save time and reduce errors by quickly accessing the correct information without having to type out the entire name. This feature is especially useful for Elixir developers who frequently work with the interactive shell, as it streamlines the development process and boosts productivity.

2. Maps & Lists: Better Performance and Usability

Maps are a fundamental data structure in Elixir, and Erlang/OTP 26 brings enhancements that can improve the performance and usability of maps and lists in Elixir projects.

In Erlang/OTP 26, the maps:merge/2 function has been improved to try to reuse the key tuple from one of the input maps, resulting in better performance. This can be particularly useful when merging maps with atom keys. Additionally, Erlang/OTP 26 introduces the maps:iterator/2 function, which supports iterating over the elements of a map in a more intuitive order.

These improvements can lead to more efficient code and better overall performance for applications that rely heavily on maps. Hooray!

Who doesn't love a little performance buff?

3. Erlang Compiler and JIT: Performance Boost

This is a biggie.

Erlang/OTP 26 introduces enhancements to the Erlang compiler and Just-In-Time (JIT) compilation, which can lead to better performance and optimization for Elixir projects.

These improvements can result in faster execution times and more efficient code. Anecdotally - the last JIT compiler performance boost helped bring our compilation down by almost 10% last time in our production stack.

I've never been one to complain about compilation times in Elixir but suping that up isn't a bad thing.

4. Dialyzer: Incremental Mode for Faster Analysis

Dialyzer, a static analysis tool for Erlang and Elixir, now supports an incremental mode in Erlang/OTP 26.

This new mode allows Elixir developers to analyze their code more efficiently, as it only re-analyzes the parts of the code that have changed since the last analysis. This can save developers time and help them identify potential issues more quickly, leading to more robust and reliable Elixir applications.


Ultimately, Erlang/OTP 26 brings a host of new features and improvements that can benefit us. From enhanced auto-completion in the shell to performance boosts in the compiler and JIT, these updates can help all of us write cleaner, more efficient code and build high-performance applications.

I love incremental updates like these, let me know what your favourite feature is over on Twitter and subscribe to my substack for similar content.

Enjoyed this content?

Want to learn and master LiveView?

Check out the book I'm writing

The Phoenix LiveView Cookbook

Sign up to my substack to be emailed about new posts