-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Replace pointer casting in hashmap_random_keys with safe code #100298
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
The old code was unnecessarily unsafe and relied on the layout of tuples always being the same as an array of the same size.
r? @thomcc (rust-highfive has picked a reviewer for you, use r? to override) |
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
@bors r+ rollup=never in case there's perf implications, though I don't expect any. |
☀️ Test successful - checks-actions |
Finished benchmarking commit (1876544): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesThis benchmark run did not return any relevant results for this metric. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
The old code was unnecessarily unsafe and relied on the layout of tuples always being the same as an array of the same size (which might be bad with
-Z randomize-layout
)?The replacement has identical codegen, so it seems like a reasonable change.