Latest Results
perf(rowan): allocate the green trees of a build in an arena
A tree builder now allocates the nodes, tokens and trivia of each build in a
bump arena instead of one allocation per element. The tree's root keeps the
arena alive, and dropping the last reference frees its chunks at once instead
of walking the tree and freeing every element.
The reference count field of an element in an arena holds a tagged pointer to
its arena, so cloning or dropping a handle counts a reference to the arena.
Handles that outlive their tree, like `TokenText`, detached nodes, `SendNode`
and the nodes that edits build, keep the arena alive without changes. While
the build is open, handles aren't counted at all, since only the builder, the
cache and the elements hold them, and the builder counts the root when it
finishes. Elements built outside a build keep their own allocation and count,
and both kinds share a layout, so a tree can mix them.
Factories create nodes through `RawSyntaxNode::new`, so the builder makes its
arena current on the thread only while a factory runs. The node cache now lasts
one build: reusing elements of earlier builds would keep their whole arenas
alive along with the new tree.
Whole parses of the JS benchmark files are 14% to 21% faster, with fewer page
faults and about the same peak memory.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>dyc3/perf-rowan-green-arena-prototype Latest Branches
+8%
feat/improve-css-duplicate-diagnostics +2%
dyc3/perf-skip-default-project-layout-per-file +7%
dyc3/perf-js-bulk-lexer-neon © 2026 CodSpeed Technology