ls lib/erlang/
Erlang and the BEAM
Maps, ETS and term order in the Erlang runtime, shared by Elixir.
- draft ETS: mutable tables in an immutable languageHow ETS gives Erlang a mutable hash table in Erlang/OTP 29: who owns a table, how update_counter changes a number in place, the linear hash table behind a set, the copies on every read, and what it costs against a map.
- draft How Erlang sorts: lists:sort, keysort and term orderWhat lists:sort does in Erlang/OTP 29: a merge sort written in Erlang that finds runs, a fixed order between all terms, why sorting tuples costs more than sorting integers, and when keysort wins.
- draft Maps on the BEAM: flatmaps, HAMTs and immutabilityWhat an Elixir map is inside Erlang/OTP 29: a sorted key tuple and a value array up to 32 keys, a 16-way hash trie after that, and how an immutable update gets away with copying a few dozen words.