Skip to content

[DO NOT MERGE] perf: test prototype mum-add-hasher #124940

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

Closed
wants to merge 5 commits into from

Conversation

orlp
Copy link
Contributor

@orlp orlp commented May 9, 2024

This PR solely exists to do a perf run of a prototype hash I created to see if it would be a worthwhile replacement for FxHash.

The hash function being tested: https://github.com/orlp/rustc-hash/blob/576bcaf44a3dd1820b0e28166a0244e1f68e0875/src/mum_add_hasher.rs.

?r @thomcc

@rustbot
Copy link
Collaborator

rustbot commented May 9, 2024

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels May 9, 2024
@rustbot
Copy link
Collaborator

rustbot commented May 9, 2024

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@orlp
Copy link
Contributor Author

orlp commented May 9, 2024

r? @thomcc

@rustbot rustbot assigned thomcc and unassigned Mark-Simulacrum May 9, 2024
@thomcc
Copy link
Member

thomcc commented May 9, 2024

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 9, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request May 9, 2024
[DO NOT MERGE] perf: test prototype mum-add-hasher

This PR solely exists to do a perf run of a prototype hash I created to see if it would be a worthwhile replacement for FxHash.

?r `@thomcc`
@bors
Copy link
Collaborator

bors commented May 9, 2024

⌛ Trying commit de4ef31 with merge 4a1a0eb...

@orlp
Copy link
Contributor Author

orlp commented May 9, 2024

Heads-up: I would not be surprised to see little difference or even a slight increase in instruction count, but my hash function has significantly higher instruction-level parallelism than FxHash for compound types, so wall-clock time should be improved. The quality of the hash should also be higher, so perhaps instruction count will be lower after all due to having less collisions.

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented May 9, 2024

☀️ Try build successful - checks-actions
Build commit: 4a1a0eb (4a1a0ebfef2d254486d24c02db2b906b1f3fc335)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (4a1a0eb): comparison URL.

Overall result: ❌ regressions - 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)
0.9% [0.3%, 1.7%] 198
Regressions ❌
(secondary)
1.0% [0.2%, 2.7%] 142
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.9% [0.3%, 1.7%] 198

Max RSS (memory usage)

Results

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
Regressions ❌
(secondary)
3.2% [3.2%, 3.2%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

Results

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.0% [0.7%, 1.6%] 3
Regressions ❌
(secondary)
2.2% [2.1%, 2.3%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.4% [-2.9%, -2.1%] 5
All ❌✅ (primary) 1.0% [0.7%, 1.6%] 3

Binary size

Results

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
Regressions ❌
(secondary)
0.0% [0.0%, 0.0%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Bootstrap: 675.773s -> 680.881s (0.76%)
Artifact size: 315.82 MiB -> 315.94 MiB (0.04%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels May 9, 2024
@orlp
Copy link
Contributor Author

orlp commented May 10, 2024

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented May 10, 2024

@orlp: 🔑 Insufficient privileges: not in try users

@thomcc
Copy link
Member

thomcc commented May 10, 2024

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 10, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request May 10, 2024
[DO NOT MERGE] perf: test prototype mum-add-hasher

This PR solely exists to do a perf run of a prototype hash I created to see if it would be a worthwhile replacement for FxHash.

The hash function being tested: https://github.com/orlp/rustc-hash/blob/576bcaf44a3dd1820b0e28166a0244e1f68e0875/src/mum_add_hasher.rs.

?r `@thomcc`
@bors
Copy link
Collaborator

bors commented May 10, 2024

⌛ Trying commit 0ca61c1 with merge 48c01ba...

@orlp
Copy link
Contributor Author

orlp commented May 10, 2024

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented May 10, 2024

⌛ Trying commit 19e2b73 with merge b034c5e...

bors added a commit to rust-lang-ci/rust that referenced this pull request May 10, 2024
[DO NOT MERGE] perf: test prototype mum-add-hasher

This PR solely exists to do a perf run of a prototype hash I created to see if it would be a worthwhile replacement for FxHash.

The hash function being tested: https://github.com/orlp/rustc-hash/blob/576bcaf44a3dd1820b0e28166a0244e1f68e0875/src/mum_add_hasher.rs.

?r `@thomcc`
@rust-log-analyzer

This comment has been minimized.

@thomcc
Copy link
Member

thomcc commented May 10, 2024

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 10, 2024
@thomcc
Copy link
Member

thomcc commented May 10, 2024

guess bors delegate doesn't work for the timer. oh well.

@bors delegate-

bors added a commit to rust-lang-ci/rust that referenced this pull request May 10, 2024
[DO NOT MERGE] perf: test prototype mum-add-hasher

This PR solely exists to do a perf run of a prototype hash I created to see if it would be a worthwhile replacement for FxHash.

The hash function being tested: https://github.com/orlp/rustc-hash/blob/576bcaf44a3dd1820b0e28166a0244e1f68e0875/src/mum_add_hasher.rs.

?r `@thomcc`
@bors
Copy link
Collaborator

bors commented May 10, 2024

⌛ Trying commit 19e2b73 with merge b911d5c...

@bors
Copy link
Collaborator

bors commented May 11, 2024

☀️ Try build successful - checks-actions
Build commit: b911d5c (b911d5cbb681b7f786b7d3b7df35279bee10c560)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (b911d5c): 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)
0.2% [0.2%, 0.2%] 5
Regressions ❌
(secondary)
0.3% [0.2%, 0.4%] 5
Improvements ✅
(primary)
-0.4% [-0.4%, -0.3%] 6
Improvements ✅
(secondary)
-0.6% [-1.3%, -0.2%] 21
All ❌✅ (primary) -0.1% [-0.4%, 0.2%] 11

Max RSS (memory usage)

Results

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)
2.9% [2.9%, 2.9%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-3.5% [-3.5%, -3.5%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.3% [-3.5%, 2.9%] 2

Cycles

Results

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
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.8% [-0.8%, -0.8%] 1
Improvements ✅
(secondary)
-3.6% [-4.3%, -2.9%] 11
All ❌✅ (primary) -0.8% [-0.8%, -0.8%] 1

Binary size

Results

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
Regressions ❌
(secondary)
0.0% [0.0%, 0.0%] 6
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Bootstrap: 673.586s -> 671.812s (-0.26%)
Artifact size: 315.84 MiB -> 316.02 MiB (0.06%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 11, 2024
@thomcc
Copy link
Member

thomcc commented May 11, 2024

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

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

bors commented May 11, 2024

⌛ Trying commit 1af9748 with merge 1460f88...

bors added a commit to rust-lang-ci/rust that referenced this pull request May 11, 2024
[DO NOT MERGE] perf: test prototype mum-add-hasher

This PR solely exists to do a perf run of a prototype hash I created to see if it would be a worthwhile replacement for FxHash.

The hash function being tested: https://github.com/orlp/rustc-hash/blob/576bcaf44a3dd1820b0e28166a0244e1f68e0875/src/mum_add_hasher.rs.

?r `@thomcc`
@rust-log-analyzer
Copy link
Collaborator

The job mingw-check-tidy failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Getting action download info
Download action repository 'msys2/[email protected]' (SHA:cc11e9188b693c2b100158c3322424c4cc1dadea)
Download action repository 'actions/checkout@v4' (SHA:0ad4b8fadaa221de15dcec353f45205ec38ea70b)
Download action repository 'actions/upload-artifact@v4' (SHA:65462800fd760344b1a7b4382951275a0abb4808)
Complete job name: PR - mingw-check-tidy
git config --global core.autocrlf false
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
---
COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

COPY host-x86_64/mingw-check/reuse-requirements.txt /tmp/
RUN pip3 install --no-deps --no-cache-dir --require-hashes -r /tmp/reuse-requirements.txt \
    && pip3 install virtualenv
COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/

# NOTE: intentionally uses python2 for x.py so we can test it still works.
# NOTE: intentionally uses python2 for x.py so we can test it still works.
# validate-toolstate only runs in our CI, so it's ok for it to only support python3.
ENV SCRIPT TIDY_PRINT_DIFF=1 python2.7 ../x.py test \
           --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
#    pip-compile --allow-unsafe --generate-hashes reuse-requirements.in
---

#12 [5/8] COPY host-x86_64/mingw-check/reuse-requirements.txt /tmp/
#12 DONE 0.0s

#13 [6/8] RUN pip3 install --no-deps --no-cache-dir --require-hashes -r /tmp/reuse-requirements.txt     && pip3 install virtualenv
#13 0.417   Downloading binaryornot-0.4.4-py2.py3-none-any.whl (9.0 kB)
#13 0.430 Collecting boolean-py==4.0
#13 0.433   Downloading boolean.py-4.0-py3-none-any.whl (25 kB)
#13 0.446 Collecting chardet==5.1.0
---
#13 4.476 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
#13 4.979 Collecting virtualenv
#13 5.030   Downloading virtualenv-20.26.1-py3-none-any.whl (3.9 MB)
#13 5.091      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 66.9 MB/s eta 0:00:00
#13 5.141 Collecting platformdirs<5,>=3.9.1
#13 5.145   Downloading platformdirs-4.2.1-py3-none-any.whl (17 kB)
#13 5.161 Collecting distlib<1,>=0.3.7
#13 5.167   Downloading distlib-0.3.8-py2.py3-none-any.whl (468 kB)
#13 5.204 Collecting filelock<4,>=3.12.2
#13 5.208   Downloading filelock-3.14.0-py3-none-any.whl (12 kB)
#13 5.208   Downloading filelock-3.14.0-py3-none-any.whl (12 kB)
#13 5.295 Installing collected packages: distlib, platformdirs, filelock, virtualenv
#13 5.459 Successfully installed distlib-0.3.8 filelock-3.14.0 platformdirs-4.2.1 virtualenv-20.26.1
#13 DONE 5.5s

#14 [7/8] COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
#14 DONE 0.0s
---
DirectMap4k:      239552 kB
DirectMap2M:     8148992 kB
DirectMap1G:    10485760 kB
##[endgroup]
Executing TIDY_PRINT_DIFF=1 python2.7 ../x.py test            --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint
+ TIDY_PRINT_DIFF=1 python2.7 ../x.py test --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint
    Finished `dev` profile [unoptimized] target(s) in 0.03s
##[endgroup]
downloading https://ci-artifacts.rust-lang.org/rustc-builds-alt/f9a3fd966162b3c7386d90fe4626471f66ba3b8f/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz
extracting /checkout/obj/build/cache/llvm-f9a3fd966162b3c7386d90fe4626471f66ba3b8f-true/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz to /checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm
---
   Compiling cargo_metadata v0.15.4
   Compiling ignore v0.4.20
   Compiling miropt-test-tools v0.1.0 (/checkout/src/tools/miropt-test-tools)
   Compiling termcolor v1.4.1
   Compiling rustc-hash v1.1.0 (https://github.com/orlp/rustc-hash/?branch=mum-hash-perf-run#223c3146)
error[E0725]: the feature `hasher_prefixfree_extras` is not in the list of allowed features
  --> /cargo/git/checkouts/rustc-hash-e2a4418644c61f2d/223c314/src/lib.rs:19:12
19 | #![feature(hasher_prefixfree_extras)]
   |            ^^^^^^^^^^^^^^^^^^^^^^^^

error[E0658]: use of unstable library feature 'hasher_prefixfree_extras'
error[E0658]: use of unstable library feature 'hasher_prefixfree_extras'
   --> /cargo/git/checkouts/rustc-hash-e2a4418644c61f2d/223c314/src/poly_hasher_ilp.rs:150:5
    |
150 | /     fn write_length_prefix(&mut self, len: usize) {
151 | |         // Most cases will specialize hash_slice anyway which calls write,
152 | |         // which encodes the length already.
    | |_____^
    |
    = note: see issue #96762 <https://github.com/rust-lang/rust/issues/96762> for more information
    = help: add `#![feature(hasher_prefixfree_extras)]` to the crate attributes to enable
    = help: add `#![feature(hasher_prefixfree_extras)]` to the crate attributes to enable
    = note: this compiler was built on 2024-04-28; consider upgrading it if it is out of date

error[E0658]: use of unstable library feature 'hasher_prefixfree_extras'
   --> /cargo/git/checkouts/rustc-hash-e2a4418644c61f2d/223c314/src/poly_hasher_ilp.rs:156:5
156 | /     fn write_str(&mut self, s: &str) {
157 | |         // We don't need anything special here.
158 | |         self.write(s.as_bytes())
159 | |     }

@bors
Copy link
Collaborator

bors commented May 11, 2024

☀️ Try build successful - checks-actions
Build commit: 1460f88 (1460f8869db1438e0c7c11634fb8011dd237c391)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (1460f88): 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)
0.3% [0.2%, 0.5%] 106
Regressions ❌
(secondary)
0.4% [0.1%, 1.4%] 36
Improvements ✅
(primary)
-0.2% [-0.3%, -0.2%] 2
Improvements ✅
(secondary)
-0.6% [-0.9%, -0.3%] 11
All ❌✅ (primary) 0.3% [-0.3%, 0.5%] 108

Max RSS (memory usage)

Results

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
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.1% [-2.1%, -2.1%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.1% [-2.1%, -2.1%] 1

Cycles

Results

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
Regressions ❌
(secondary)
2.8% [2.8%, 2.8%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.2% [-2.3%, -2.1%] 5
All ❌✅ (primary) - - 0

Binary size

Results

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
Regressions ❌
(secondary)
0.0% [0.0%, 0.0%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Bootstrap: 675.13s -> 674.66s (-0.07%)
Artifact size: 316.00 MiB -> 316.04 MiB (0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 11, 2024
@Dylan-DPC Dylan-DPC added S-experimental Status: Ongoing experiment that does not require reviewing and won't be merged in its current state. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 16, 2024
@orlp orlp closed this Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
perf-regression Performance regression. S-experimental Status: Ongoing experiment that does not require reviewing and won't be merged in its current state. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants