-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Tell LLVM that partition_point
returns a valid fencepost
#102535
Tell LLVM that partition_point
returns a valid fencepost
#102535
Conversation
This was already done for a successful `binary_search`, but this way `partition_point` can get similar optimizations.
This comment was marked as resolved.
This comment was marked as resolved.
Recently using @bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit c7af338 with merge 7c6425f66f7ebc2482f0812dfe07a02a67b36030... |
I'd be extremely surprised if this showed up in perf, since the branch is probably perfectly predicted since LLVM knows the panic is cold, and this doesn't help the line lookup case. The following use is the kind of thing that this PR should improve, but it's probably not hot enough to show up: rust/compiler/rustc_data_structures/src/sorted_map/index_map.rs Lines 98 to 99 in 5a7e4c6
|
☀️ Try build successful - checks-actions |
Queued 7c6425f66f7ebc2482f0812dfe07a02a67b36030 with parent de341fe, future comparison URL. |
Finished benchmarking commit (7c6425f66f7ebc2482f0812dfe07a02a67b36030): comparison URL. Overall result: ❌ regressions - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Footnotes |
Ok, basically no changes. |
This is great, thanks! @bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (c2590e6): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Footnotes |
…-point, r=thomcc Tell LLVM that `partition_point` returns a valid fencepost This was already done for a successful `binary_search`, but this way `partition_point` can get similar optimizations. Demonstration that nightly can't do this optimization today, and leaves in the panicking path: <https://play.rust-lang.org/?version=nightly&mode=release&edition=2021&gist=e1074cd2faf5f68e49cffd728ded243a> r? `@thomcc`
This was already done for a successful
binary_search
, but this waypartition_point
can get similar optimizations.Demonstration that nightly can't do this optimization today, and leaves in the panicking path: https://play.rust-lang.org/?version=nightly&mode=release&edition=2021&gist=e1074cd2faf5f68e49cffd728ded243a
r? @thomcc