-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
source_span query optimized to be inlined function in case of non-incremental build #146880
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@bors2 try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
source_span hook in case of non-incremental build
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (396339e): 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 -2.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -1.6%)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: 472.868s -> 472.157s (-0.15%) |
This stats were derived from collected data about individual query calls/executions during a compilation (or rather a check) on the Details here: #t-compiler > How does the option `query_dep_graph` work? @ 💬 |
|
Could you change this to a version that checks the incremental flag every time instead of introducing a hook? |
|
Reminder, once the PR becomes ready for a review, use |
6123d0a to
f70366e
Compare
Changed. |
f70366e to
30de58e
Compare
|
@rustbot ready |
|
In the incr-full scenarios the old Let's rerun perf on the new master just in case. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
source_span query optimized to be inlined function in case of non-incremental build
|
If the difference is indeed noise, it means that either:
|
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (13bb904): comparison URL. Overall result: no relevant changes - 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 countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary -2.5%, secondary 3.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 470.943s -> 470.808s (-0.03%) |
|
Yeah, it's noise. |
…pt, r=petrochenkov hir_owner_parent optimized to inlined call for non-incremental build Continuation of rust-lang#146880 and rust-lang#147232. 'hir_owner_parent' query renamed 'hir_owner_parent_q'. hir_owner_parent inlined function added to optimize performance in case of non-incremental build. 'hir_owner_parent' query has low normalized average execution time (163ns) and good cache_hits (5773) according Daria's processed statistics. 'source_span', for comparison, has avg_ns_norm = 66ns and cache_hits = 11361. Optimization may be profitable for queries with low normalized average execution time (to replace cache lookup into inlined call) and be significant with good cache_hits. | Query | cache_hits | min_ns | max_ns | avg_ns_norm | | ------------- | ------------- | ------------- | ------------- | ------------- | source_span | 11361 | 18 | 2991 | 66 hir_owner_parent | 5773 | 52 | 1773 | 163 is_doc_hidden | 3134 | 47 | 1111 | 285 lookup_deprecation_entry | 13905 | 36 | 6208 | 287 object_lifetime_default | 5840 | 63 | 4688 | 290 upvars_mentioned | 2575 | 75 | 7722 | 322 intrinsic_raw | 21235 | 73 | 3453 | 367 Draft PR to measure performance changes.
Rollup merge of #147387 - azhogin:azhogin/hir_owner_parent_opt, r=petrochenkov hir_owner_parent optimized to inlined call for non-incremental build Continuation of #146880 and #147232. 'hir_owner_parent' query renamed 'hir_owner_parent_q'. hir_owner_parent inlined function added to optimize performance in case of non-incremental build. 'hir_owner_parent' query has low normalized average execution time (163ns) and good cache_hits (5773) according Daria's processed statistics. 'source_span', for comparison, has avg_ns_norm = 66ns and cache_hits = 11361. Optimization may be profitable for queries with low normalized average execution time (to replace cache lookup into inlined call) and be significant with good cache_hits. | Query | cache_hits | min_ns | max_ns | avg_ns_norm | | ------------- | ------------- | ------------- | ------------- | ------------- | source_span | 11361 | 18 | 2991 | 66 hir_owner_parent | 5773 | 52 | 1773 | 163 is_doc_hidden | 3134 | 47 | 1111 | 285 lookup_deprecation_entry | 13905 | 36 | 6208 | 287 object_lifetime_default | 5840 | 63 | 4688 | 290 upvars_mentioned | 2575 | 75 | 7722 | 322 intrinsic_raw | 21235 | 73 | 3453 | 367 Draft PR to measure performance changes.
source_span query renamed to source_span_q.
source_span inlined function implemented to call source_span implementation in case of non-incremental build and call query otherwise.
Some other queries may be optimized in a such way.
Statistics prepared (queries with small 'avg_ns_norm' and big 'cache_hits' may be optimized):
Non-feedable only and cache_hits > 500:
queries_stat_non_feedable.csv