Skip to content

Specialize HashStable for [u8] slices #90208

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

Merged
merged 1 commit into from
Oct 24, 2021

Conversation

Mark-Simulacrum
Copy link
Member

@Mark-Simulacrum Mark-Simulacrum commented Oct 23, 2021

Particularly for ctfe-stress-4, the hashing of byte slices as part of the
MIR Allocation is quite hot. Previously, we were falling back on byte-by-byte
copying of the slice into the SipHash buffer (64 bytes long) before hashing a 64
byte chunk, and then doing that again and again; now we use the dedicated byte-slice write.

Particularly for ctfe-stress-4, the hashing of byte slices as part of the
MIR Allocation is quite hot. Previously, we were falling back on byte-by-byte
copying of the slice into the SipHash buffer (64 bytes long) before hashing a 64
byte chunk, and then doing that again and again.

This should hopefully be an improvement for that code.
@Mark-Simulacrum
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 23, 2021
@bors
Copy link
Collaborator

bors commented Oct 23, 2021

⌛ Trying commit 3cd5c95 with merge 32fa510127d3d61a41f76035ff5573c49ea98243...

@bors
Copy link
Collaborator

bors commented Oct 23, 2021

☀️ Try build successful - checks-actions
Build commit: 32fa510127d3d61a41f76035ff5573c49ea98243 (32fa510127d3d61a41f76035ff5573c49ea98243)

@rust-timer
Copy link
Collaborator

Queued 32fa510127d3d61a41f76035ff5573c49ea98243 with parent aa5740c, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (32fa510127d3d61a41f76035ff5573c49ea98243): comparison url.

Summary: This change led to very large relevant improvements 🎉 in compiler performance.

  • Very large improvement in instruction counts (up to -8.0% on incr-full builds of ctfe-stress-4)

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

Benchmarking 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 led to changes in compiler perf.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf -perf-regression

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Oct 23, 2021
@Mark-Simulacrum
Copy link
Member Author

r? rust-lang/compiler

@oli-obk
Copy link
Contributor

oli-obk commented Oct 24, 2021

@bors r+

@bors
Copy link
Collaborator

bors commented Oct 24, 2021

📌 Commit 3cd5c95 has been approved by oli-obk

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 24, 2021
@bors
Copy link
Collaborator

bors commented Oct 24, 2021

⌛ Testing commit 3cd5c95 with merge bdcb528...

@bors
Copy link
Collaborator

bors commented Oct 24, 2021

☀️ Test successful - checks-actions
Approved by: oli-obk
Pushing bdcb528 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 24, 2021
@bors bors merged commit bdcb528 into rust-lang:master Oct 24, 2021
@rustbot rustbot added this to the 1.58.0 milestone Oct 24, 2021
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (bdcb528): comparison url.

Summary: This change led to very large relevant improvements 🎉 in compiler performance.

  • Very large improvement in instruction counts (up to -8.0% on incr-full builds of ctfe-stress-4)

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants