Gleam 1.19 Stops Writing Erlang Source and Compiles 21 Percent Faster in One Benchmark
Software / news
Gleam 1.19 Stops Writing Erlang Source and Compiles 21 Percent Faster in One Benchmark
The Oct. 5 release hands the Erlang compiler a syntax tree directly, and the only numbers for it come from a synthetic benchmark whose README names no author.
Gleam 1.19.0 stopped generating Erlang source code and now emits Erlang abstract forms instead, the project said in a post dated Oct. 5 by its creator Louis Pilfold. In the one public benchmark that lists both versions, a Gleam 1.19.0 build for Erlang took 0.342 seconds against 0.434 seconds for 1.17.0, a drop of about 21 percent by our arithmetic.
Abstract forms are the tree-shaped intermediate form the Erlang compiler normally builds from its own tokeniser and parser. Gleam can now load that tree directly and skip the front half of the Erlang compiler. The post says Giacomo Cavalieri rewrote the code generator, and that a first stage shipped in 1.18.0.
What changes for a Gleam developer
The post gives two reasons: faster builds for the Erlang target, and BEAM stack traces and crash reports that point to accurate Gleam line numbers. The old generator, Pilfold wrote, conformed less to current standards.
He also explains why Gleam did not go further down to BEAM bytecode. Bytecode changes with each VM release, so Gleam would have to track it indefinitely, and reproducing decades of Erlang compiler optimisations would be a large effort. He calls abstract forms "the cost-benefit sweet-spot for Gleam today" and notes that Elixir uses the same approach.
The release also adds a few things to the command line. The gleam tool now writes .app files when compiling to BEAM, and compile-package gains --no-dev, which skips dev_dependencies. The goal the post sets is Gleam support in Elixir's Mix and Erlang's rebar3. The post lists no breaking changes.
The benchmark behind the number
Pilfold used a compile benchmark called langcompilebench, which the post credits to José Valim. The repository that hosts it, lpil/langcompilebench, sits under the lpil account and its README does not name an author, so the two do not match on their face. The README describes the suite as synthetic benchmarks of compilation and build times, reports the median of 11 runs and does not describe the machine.
The post shows charts but gives no figures in its text, and Pilfold describes the improvement only as "considerable". He also cautions that benchmarks are contrived and that incremental builds are much faster in practice.
| Language | Seconds |
|---|---|
| Gleam 1.19.0, JavaScript | 0.188 |
| Go 1.27.1 | 0.195 |
| Gleam 1.19.0, Erlang | 0.342 |
| Erlang 29.0.6 | 0.406 |
| Gleam 1.17.0, Erlang | 0.434 |
| Elixir 1.20.4 | 0.509 |
| Rust | 0.733 |
| TypeScript 7 | 0.965 |
Gleam on Erlang, at 0.342 seconds, beats plain Erlang at 0.406 on this table. That is odd enough that the right reading is the benchmark's: one synthetic project, 11 runs, a machine nobody described.
- Gleam 1.19.0 (JavaScript)0.19 s
- Gleam 1.19.0 (Erlang)0.34 s
- Gleam 1.17.0 (Erlang)0.43 s
- Elixir 1.20.40.51 s
Source: lpil/langcompilebench README, accessed 2026-11-05
Who pays for it
Pilfold wrote that Gleam is funded by sponsors, most of whom give between $5 and $20 a month, that the project is working toward paying core team members, and that Gleam is his sole source of income. Lambda Class is the top sponsor.
A compiler maintained on those terms is worth reading against the Zig libc rewrite that slowed SQLite roughly 12,000x on one input, where a speed claim and a regression both turned on a single workload. A rewrite of a core tool can also break scripts, as Ubuntu's sudo-rs did; Gleam's post says 1.19.0 has no such breaks.
The Mix and rebar3 integration the post names as the goal has no date attached to it.
Sources
More in Software
- 01Muru, Graham Dumpleton's Rust Server for Python Apps, Has 185 Open Issues and No BenchmarksThe mod_wsgi author's alpha project takes contributions as requirements rather than code, and its first post shows a 0.2 ms log line.
- 02Fast-Anything Reports a 116x Python Speedup, and 8 of Its 9 Benchmark Rows Run One JobThe MIT-licensed tool ports hot functions to Rust with a coding agent, and its README gives no run counts or variance.
- 03ClawDOS Runs a Claude Coding Agent on a 4.77 MHz IBM PC XT, With TLS Handed to a TunnelThe GPLv3 project keeps a 176 KB harness on the 8088 and offloads encryption to a second machine, leaving a launched program 200K of the 640K.
- 04Levien's Next-100 Rust GUIs Post Counts About 20 New Toolkits and Bets Against egui's Immediate ModeThe Linebender author credits AI rewrites for the surge; egui's own README concedes the trade-off he is pressing on.