julia
18e6faf9 - Compiler: Stop boxing method matches and call arguments twice per call

Commit
3 hours ago
Compiler: Stop boxing method matches and call arguments twice per call `MethodMatches` and `UnionSplitMethodMatches` are boxed when `find_method_matches` returns them, and boxed once more when `CallInferenceState` stores them in its `Union`-typed field. As mutable structs with const fields, the first allocation is shared instead. `abstract_call_known` also assigned `argtypes` twice; because its closures capture the variable, that cost a `Core.Box` on every call. On the inference workload of the TTFX Ferrite task, allocation in the compiler drops by 1.5%, with the optimized code of all inferred `CodeInstance`s unchanged. Assisted-by: Claude Code (Opus 5.5)
Author
Committer
Parents
Loading