-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Shallowly bail from coerce_unsized
more
#142941
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
base: master
Are you sure you want to change the base?
Conversation
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
[perf] Shallowly bail from `coerce_unsized` more
TODO: test with a fast path for |
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 (6a35eeb): 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 -1.2%, secondary -5.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -4.5%, secondary -15.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (secondary -0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 688.989s -> 689.016s (0.00%) |
holy fuck lol |
e0b68fe
to
3d115ac
Compare
@bors2 try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
[perf] Shallowly bail from `coerce_unsized` more
Anyways this is ready to review. r? @lcnr |
rustbot has assigned @petrochenkov. Use |
The job Click to see the possible cause of the failure (guessed by this bot)
|
This comment has been minimized.
This comment has been minimized.
Crashes should be fixed by #142976; they're only coincidentally fixed here by the fast path bc we don't end up trying |
coerce_unsized
morecoerce_unsized
more
Finished benchmarking commit (1eb1a24): 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.9%, secondary -3.8%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -2.0%, secondary -12.2%)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: 689.383s -> 687.827s (-0.23%) |
We do a lot of coercion in HIR typeck. Most of the time we're just coercing a type to itself, but we always try
coerce_unsized
even if it's not necessary.Let's avoid doing that by adding a fast path to
coerce_unsized
; see the comment in that function.