perf(ecmascript): box RequireContextValue inside WellKnownFunctionKind
Shrinks WellKnownFunctionKind from 64 to 16 bytes and consequently JsValue from 64 to 48 bytes. RequireContextValue wraps an FxIndexMap and is only constructed once per require.context() call site, so the added allocation is rare — but every JsValue clone/move/drop (now 25% cheaper by size) is on the linker hot path. Measured with link_profile on tests/benches/jsonwebtoken.js, hyperfine --runs 5: before: 1.893 s ± 0.014 s after: 1.758 s ± 0.012 s (-7.1%)
Showing
Please
register
or
sign in
to comment