-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Remove 'simple array' lowering of format_args!(). #139175
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
b1add46
to
e039260
Compare
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Remove 'simple array' lowering of format_args!(). format_args!() uses a simpler (faster to compile) lowering in simple cases. However, selecting that case is somewhat complicated, as it does not work if any argument beyond the first one contains a yield point, so we have to check for that. As part of the solution for rust-lang#92698 and rust-lang#139136, it might need to get even more complicated, checking for any lifetime-extended temporaries or any const-promotable expressions. This is an experiment to see the impact of just removing this optimazation. This has been tried before with [slightly negative results](rust-lang#106770 (comment)), but maybe things have changed by now. :)
This comment was marked as outdated.
This comment was marked as outdated.
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Remove fragile equal-pointers-unequal/*/print3.rs tests. These tests were added in rust-lang#127003 The print3.rs tests stop working when I change implementation details of format_args!(). (For example, in rust-lang#139175 and rust-lang#139135). These tests shouldn't rely on such implementation details. It gets in the way for format_args!() improvements. If they test anything that aren't already covered by the other tests in this directory, they should be expressed in a less fragile way that doesn't rely on internal details of format_args!(). cc `@GrigorenkoPV,` author of these tests.
Remove fragile equal-pointers-unequal/*/print3.rs tests. These tests were added in rust-lang#127003 The print3.rs tests stop working when I change implementation details of format_args!(). (For example, in rust-lang#139175 and rust-lang#139135). These tests shouldn't rely on such implementation details. It gets in the way for format_args!() improvements. If they test anything that aren't already covered by the other tests in this directory, they should be expressed in a less fragile way that doesn't rely on internal details of format_args!(). cc ``@GrigorenkoPV,`` author of these tests.
@rust-timer build 19f2dc7 |
This comment has been minimized.
This comment has been minimized.
Rollup merge of rust-lang#139176 - m-ou-se:print3, r=compiler-errors Remove fragile equal-pointers-unequal/*/print3.rs tests. These tests were added in rust-lang#127003 The print3.rs tests stop working when I change implementation details of format_args!(). (For example, in rust-lang#139175 and rust-lang#139135). These tests shouldn't rely on such implementation details. It gets in the way for format_args!() improvements. If they test anything that aren't already covered by the other tests in this directory, they should be expressed in a less fragile way that doesn't rely on internal details of format_args!(). cc ``@GrigorenkoPV,`` author of these tests.
Finished benchmarking commit (19f2dc7): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowBenchmarking 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. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (primary 1.2%, secondary -0.4%)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 (primary 1.0%)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 sizeResults (primary 0.1%, secondary 0.1%)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.
Bootstrap: 776.145s -> 776.905s (0.10%) |
…try> Remove 'simple array' lowering of format_args!() for >1 args. This is rust-lang#139175 but keeps the 'simple array' lowering for the case with 1 argument. This is an experiment to see the impact.
format_args!() uses a simpler (faster to compile) lowering in simple cases. However, selecting that case is somewhat complicated, as it does not work if any argument beyond the first one contains a yield point, so we have to check for that.
As part of the solution for #92698 and #139136, it might need to get even more complicated, checking for any lifetime-extended temporaries or any const-promotable expressions.
This is an experiment to see the impact of just removing this optimization.
This has been tried before with slightly negative results, but maybe things have changed by now. :)