You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build parser tokens as one monomorphic literal instead of mutating interned fields
The no-inlining profile attributed ~14% of parse time to the token
interning loop: internTok ADDED k/t to already-shaped lexer tokens (two
hidden-class transitions per token, on top of the conditional
newlineBefore stamp making shapes polymorphic at every tok.k/tok.t site).
The tokenize wrapper now rebuilds each token as a single literal with
every field the parser reads (type/text/offset/k/t + the three stamp
flags normalized to booleans) — one shape from birth. The matchPuLit
'>'-split tokens go through the same mkPunct shape. internTok is gone.
Gates: full 18,805-file corpus byte-identical, 26/26 check.
Bench: aggregate +3.1~5.4% across three runs.
0 commit comments