Latest Results
perf(concatenated): store binding references as indices
Concatenated modules keep the references of every binding, and each reference
stored a full copy of the identifier (32 bytes) plus a vector header inside a
per-module map that reserved room for every identifier of the module.
Collect them in a BindingRefs value instead, which keeps the field name the call
sites already use: one flat list of bindings (name, syntax context and the range
of that binding's references) plus one shared list of references as indices into
idents, which already holds every identifier of the module. A reference drops
from 32 bytes to 4 and a binding from a map slot plus a vector header to 24; the
map used while collecting is temporary now, which also removes its per-module
reservation. The per-module global_scope_ident capacity reservation is dropped
as well, since it was sized for every identifier although only global-scope ones
are kept.
react-10k production build (9 concatenated modules, 10,901 module infos):
binding_to_ref 13.29 -> 2.63 MiB, global_scope_ident 3.21 -> 2.22 MiB and the
whole per-module info 35.12 -> 23.30 MiB; the emitted assets are byte-identical.
A production app build (19,416 module infos, 694,522 bindings, 2.21M binding
references, all live while the concatenation is analysed) goes from 126.8 MiB to
30.9 MiB for the same structure. Latest Branches
0%
codex/url-module-type-probe 0%
codex/add-allocative-skill 0%
© 2026 CodSpeed Technology