-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
compiler: Never debug_assert in codegen #127995
Conversation
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
…=<try> compiler: Never debug_assert in codegen In the name of Turing and his Hoarey heralds, assert our truths before creating a monster. Currently experimenting.
This comment has been minimized.
This comment has been minimized.
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (aa45835): comparison URL. Overall result: ✅ improvements - 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)Results (secondary 3.8%)This 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.
CyclesResults (secondary 2.8%)This 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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 770.598s -> 769.008s (-0.21%) |
The gains in performance are not worth the costs in correctness. This is partly because the gains are zero and the costs are unknown.
8b49b44
to
ce7b069
Compare
r? compiler |
@bors rollup=never |
…=BoxyUwU compiler: Never debug_assert in codegen In the name of Turing and his Hoarey heralds, assert our truths before creating a monster! The `rustc_codegen_llvm` and `rustc_codegen_ssa` crates are fairly critical for rustc's correctness. Small mistakes here can easily result in undefined behavior, since a "small mistake" can mean something like "link and execute the wrong code". We should probably run any and all asserts in these modules unconditionally on whether this is a "debug build", and damn the costs in performance. ...Especially because the costs in performance seem to be *nothing*. It is not clear how much correctness we gain here, but I'll take free correctness improvements.
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
I'm sorry? |
@bors retry spurious msvc error |
☀️ Test successful - checks-actions |
Finished benchmarking commit (28e684b): 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)Results (primary 3.2%)This 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.
CyclesResults (secondary -6.8%)This 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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 771.005s -> 770.337s (-0.09%) |
In the name of Turing and his Hoarey heralds, assert our truths before creating a monster!
The
rustc_codegen_llvm
andrustc_codegen_ssa
crates are fairly critical for rustc's correctness. Small mistakes here can easily result in undefined behavior, since a "small mistake" can mean something like "link and execute the wrong code". We should probably run any and all asserts in these modules unconditionally on whether this is a "debug build", and damn the costs in performance....Especially because the costs in performance seem to be nothing. It is not clear how much correctness we gain here, but I'll take free correctness improvements.
r? @ghost