Skip to content
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

Optimize DefaultHasher siphash #130112

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Noratrieb
Copy link
Member

let's see how re-applying #69152 again goes.
imo this is a huge speedup that would be worth some compile time regressions, but i wanna see first. probably won't have the time and energy to argue for it though, if there are significant regressions ^^'

cc @nnethercote

Co-authored-by: Noratrieb <48135649+Noratrieb@users.noreply.github.com>
@Noratrieb
Copy link
Member Author

@bors try @rust-timer queue

@rustbot
Copy link
Collaborator

rustbot commented Sep 8, 2024

r? @cuviper

rustbot has assigned @cuviper.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rust-timer

This comment has been minimized.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Sep 8, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 8, 2024
…rr, r=<try>

Optimize DefaultHasher siphash

let's see how re-applying rust-lang#69152 again goes.
imo this is a huge speedup that would be worth some compile time regressions, but i wanna see first. probably won't have the time and energy to argue for it though, if there are significant regressions ^^'

cc `@nnethercote`
@bors
Copy link
Contributor

bors commented Sep 8, 2024

⌛ Trying commit 1bb82de with merge b6cd5d6...

@Noratrieb Noratrieb marked this pull request as draft September 8, 2024 18:48
@bors
Copy link
Contributor

bors commented Sep 8, 2024

☀️ Try build successful - checks-actions
Build commit: b6cd5d6 (b6cd5d61b5c53b0513dac3cb0ae01e4742c328ef)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (b6cd5d6): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

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 may lead to changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

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

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
1.1% [0.3%, 3.3%] 10
Regressions ❌
(secondary)
2.8% [0.3%, 7.1%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.5% [-0.6%, -0.4%] 2
All ❌✅ (primary) 1.1% [0.3%, 3.3%] 10

Max RSS (memory usage)

Results (primary 1.4%, secondary 5.6%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
5.5% [4.5%, 6.5%] 2
Regressions ❌
(secondary)
5.6% [5.6%, 5.6%] 1
Improvements ✅
(primary)
-2.6% [-3.6%, -1.5%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.4% [-3.6%, 6.5%] 4

Cycles

Results (primary 1.3%, secondary 6.8%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
1.3% [0.7%, 3.1%] 5
Regressions ❌
(secondary)
6.8% [6.8%, 6.8%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.3% [0.7%, 3.1%] 5

Binary size

Results (primary 0.1%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.2% [0.0%, 1.0%] 33
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.1% [-0.2%, -0.0%] 21
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.1% [-0.2%, 1.0%] 54

Bootstrap: 756.685s -> 757.535s (0.11%)
Artifact size: 341.18 MiB -> 341.13 MiB (-0.01%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Sep 8, 2024
@nnethercote
Copy link
Contributor

The perf CI results show the slowdown this causes in compile times, which aren't great, but also aren't terrible. But they don't provide any measurements about the benefits of this change, because rustc doesn't use SipHasher. This comment explains how rustc can be modified to use SipHasher. Having CI perf runs of "rustc"1 and "rustc2" in this PR would be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
perf-regression Performance regression. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants