compact compiler ids and spans to reduce memory usage
This commit is contained in:
@@ -29,3 +29,9 @@ The measured run reduced token size by 14.3% and peak tracked memory by 9.8%.
|
||||
After the iterative compiler-hardening work on 2026-06-12, the same benchmark
|
||||
reported 13,222,443 peak bytes and 40,117 allocations. The reusable traversal
|
||||
stacks keep allocation count effectively unchanged from the interning baseline.
|
||||
|
||||
After migrating persistent compiler references and spans to compact IDs on
|
||||
2026-06-12, the benchmark reported 8,651,659 peak bytes and 40,117 allocations.
|
||||
`Span` is 12 bytes and `Token` is 24 bytes; AST expressions, HIR expressions,
|
||||
and IR instructions are 64, 88, and 88 bytes respectively. These sizes are
|
||||
also printed by the benchmark to catch layout regressions.
|
||||
|
||||
Reference in New Issue
Block a user