perf(ecmascript): shrink Call/New args from Vec to Box<[T]>
Swap `Vec<JsValue>` (24 B) for `Box<[JsValue]>` (16 B) on `JsValue::Call` and `JsValue::New` args. Analysis never pushes to args after construction — the `Vec`'s capacity field is dead weight. A few consumer sites that want an owned `Vec` convert via `into_vec()` (O(1), reuses the backing allocation). Shrinks `Call`/`New` variant payloads from 40 B to 32 B. `JsValue`'s overall enum size stays at 40 B (driven by `Unknown`, unchanged). Measured net perf win of 2–6 % on the `references` criterion bench: `Vec::capacity` is checked / decremented across the analyzer's hot paths, and dropping those accesses pays for the O(1) conversion cost. Snapshots stable. All 351 lib tests pass.
Showing
Please
register
or
sign in
to comment