-
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
[experiment] use unreachable_unchecked() everywhere #53307
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
I feel like if this looks to be a good idea then in the hotspots we should still have a debug fallback:
You could probably instead just have this in scope where you want it, do reduce the diff, but that's probably an unnecessary amount of non-local effect:
Can you override |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
@bors delegate+ |
✌️ @ljedrz can now approve this pull request |
@ljedrz |
1b3a8a4
to
3b7fe5b
Compare
@petrochenkov thanks; I'd run all the tests on my own, but unfortunately on Windoze I can only get to
And the module-level tests are performed only after those; do you know if there is any way I can fix these issues, skip edit: I just found a |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
You can disable the debuginfo test suite by commenting it out in this list https://github.com/rust-lang/rust/blob/master/src/bootstrap/builder.rs#L377-L429 |
@petrochenkov thanks, that allowed me to go a lot further; I'm still getting some spurious-looking errors by the end, but hopefully I've covered all the relevant issues by now. |
@bors try |
⌛ Trying commit 3400023 with merge 17a91f559ea8afdd4b2413b71b21348f4fe80286... |
☀️ Test successful - status-travis |
@rust-timer build 17a91f5 |
Insufficient permissions to issue commands to rust-timer. |
@petrochenkov I guess delegating doesn't extend to perf runs; can you help here? |
@rust-timer build 17a91f559ea8afdd4b2413b71b21348f4fe80286 |
Success: Queued 17a91f559ea8afdd4b2413b71b21348f4fe80286 with parent 5bb9239, comparison URL. |
Not much effect. |
Well that's fantastic news right? That means we get to keep the checked unreachables without leaving performance on the table. |
Yeah, it looks like there isn't much to gain here; I think we can close it along with the related issue. |
This is an experimental commit designed to measure if changing
unreachable!()
to its faster unsafe counterpart can result in measurable performance gains (see #52945).We don't want to perform this change everywhere, only consider it in hot spots under infallible conditions. With any luck a perf run could point us into the right direction; this approach has worked with
assert!
(#53025).cc @dtolnay