Store dep_kind_vtables in an array inside QuerySystem#153950
Store dep_kind_vtables in an array inside QuerySystem#153950Zalathar wants to merge 2 commits intorust-lang:mainfrom
dep_kind_vtables in an array inside QuerySystem#153950Conversation
This commit also changes the type of `DepKind::NUM_VARIANTS` to `usize`, which is important for the next commit.
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Store `dep_kind_vtables` in an array inside `QuerySystem`
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (e73bdda): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -0.6%, secondary -2.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -3.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 482.3s -> 482.558s (0.05%) |
|
Looks like a very modest across-the-board perf win. I would be reluctant to accept that for a PR that added complexity in the name of performance, but since this PR is aiming to reduce complexity, getting a slim perf boost is a nice bonus. |
|
It would be nice to make the DepKindVTable array fully static, but that might require |
|
☔ The latest upstream changes (presumably #154289) made this pull request unmergeable. Please resolve the merge conflicts. |
This should hopefully avoid a bounds-check and indirection on every DepKindVTable lookup, and also makes query system init a little nicer.