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
- 01Psalm 7 Turns On Taint Analysis by Default for PHPThe static analyzer's new major release adds a prompt-injection taint kind, replaces its purity annotations with capabilities, and has already reached 7.2.0 within a week.
- 02Node.js 27 Alpha Doubles the Default Heap on 8 GB MachinesThe first release under Node's annual schedule also changes the V8 serialization format, so a payload written by 27 cannot be read by 26.
- 03Meta's Astryx Design System Hits 19.7k Stars, Still in BetaThe MIT-licensed React 19 library claims 150+ components and 13,000 internal apps, but its charts and Vega packages exist only under a canary tag.
- 04KetchUp, the Rust SketchUp Alternative, Is Now BenchUpThe MIT-licensed woodworking modeler imports .skp files and runs in a browser on WebGPU, and its README spells out which old project files survive the rename.