-
Notifications
You must be signed in to change notification settings - Fork 600
Clean up unreachable_unchecked #1276
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
I would like to understand #1275 before landing any workaround. Was the unreachable_unchecked not actually unreachable? If there is a compiler bug has that been minimized and reported? |
@dtolnay to be clear, I haven't investigated that at all: I came across this during unsafe review and didn't think the unsafe was necessary here. |
I think this removes some unsafe in a way that ought not affect performance, and that makes it a good change on its own. It's not a workaround. I do not have access to the code in #1275 and cannot debug it. They are welcome to apply this patch and see if it changes anything. I suspect it won't, I suspect their leak comes from elsewhere. |
Based on the benchmark in the PR that introduced this code, on my machines this PR regresses serialization performance by 22% (2990WX) or 51% (M4 Max). |
Oh, hm. That's not good. I'm pretty sure this code can be written without the unreachable, but perhaps my way of doing it has a problem. Either the |
Alternate idea: we stick a |
I'm working on an isolate repro scenario however I've been so busy with work that I haven't had time to get anywhere yet. Reading the docs on |
No description provided.