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

HashMap/HashSet: forward fold implementations of iterators #117756

Merged
merged 2 commits into from Jan 20, 2024

Conversation

a1phyr
Copy link
Contributor

@a1phyr a1phyr commented Nov 9, 2023

Use rust-lang/hasbrown#480 in std

Note: this needs a version bump of hashbrown before merging

@rustbot
Copy link
Collaborator

rustbot commented Nov 9, 2023

r? @joshtriplett

(rustbot has picked a reviewer for you, use r? to override)

@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. labels Nov 9, 2023
@Kobzol
Copy link
Contributor

Kobzol commented Nov 9, 2023

@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 Nov 9, 2023
@bors
Copy link
Contributor

bors commented Nov 9, 2023

⌛ Trying commit 32e04b3 with merge 83a6feb...

bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 9, 2023
`HashMap`/`HashSet`: forward `fold` implementations of iterators

Use [rust-lang/hasbrown#480](rust-lang/hashbrown#480) in `std`
@a1phyr
Copy link
Contributor Author

a1phyr commented Nov 9, 2023

Maybe we should use the patched hashbrown for perf ?

@bors
Copy link
Contributor

bors commented Nov 9, 2023

☀️ Try build successful - checks-actions
Build commit: 83a6feb (83a6feba202b76aa456ab05efd1e28054ffb8081)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (83a6feb): comparison URL.

Overall result: no relevant changes - no 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.

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

Instruction count

This benchmark run did not return any relevant results for this metric.

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)
3.4% [0.0%, 13.0%] 8
Regressions ❌
(secondary)
2.2% [2.2%, 2.2%] 1
Improvements ✅
(primary)
-1.6% [-4.5%, -0.5%] 7
Improvements ✅
(secondary)
-3.6% [-3.6%, -3.6%] 1
All ❌✅ (primary) 1.1% [-4.5%, 13.0%] 15

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.0% [1.8%, 2.1%] 2
Improvements ✅
(primary)
-0.4% [-0.4%, -0.4%] 2
Improvements ✅
(secondary)
-13.5% [-13.5%, -13.4%] 2
All ❌✅ (primary) -0.4% [-0.4%, -0.4%] 2

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

Bootstrap: 663.537s -> 660.887s (-0.40%)
Artifact size: 308.81 MiB -> 308.84 MiB (0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 10, 2023
@a1phyr
Copy link
Contributor Author

a1phyr commented Nov 27, 2023

I can't update hashbrown to the last version due to its new transitive dependency added to ahash in tkaitchuck/aHash#162

tidy error: invalid license `BSD-2-Clause OR Apache-2.0 OR MIT` in `zerocopy 0.7.26 (registry+https://github.com/rust-lang/crates.io-index)`
tidy error: invalid license `BSD-2-Clause OR Apache-2.0 OR MIT` in `zerocopy-derive 0.7.26 (registry+https://github.com/rust-lang/crates.io-index)`
tidy error: Dependency for . not explicitly permitted: zerocopy 0.7.26 (registry+https://github.com/rust-lang/crates.io-index)
tidy error: Dependency for . not explicitly permitted: zerocopy-derive 0.7.26 (registry+https://github.com/rust-lang/crates.io-index)
Go to `src/tools/tidy/src/deps.rs:184` for the list.
tidy error: invalid license `BSD-2-Clause OR Apache-2.0 OR MIT` in `zerocopy 0.7.26 (registry+https://github.com/rust-lang/crates.io-index)`
tidy error: invalid license `BSD-2-Clause OR Apache-2.0 OR MIT` in `zerocopy-derive 0.7.26 (registry+https://github.com/rust-lang/crates.io-index)`

Shouldn't this be accepted though ? Maybe the tool isn't smart enough.

@rustbot
Copy link
Collaborator

rustbot commented Nov 27, 2023

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.

@rust-log-analyzer

This comment has been minimized.

@klensy
Copy link
Contributor

klensy commented Nov 27, 2023

I can't update hashbrown to the last version due to its new transitive dependency added to ahash in tkaitchuck/aHash#162

ahash 0.8.4 pulling zerocopy* (which pulls proc-macro2, syn, quote) in small commit tkaitchuck/aHash@a74829b, and now this is included into hashbrown -> stdlib as dependency, not nice :-(

@bors
Copy link
Contributor

bors commented Dec 3, 2023

☔ The latest upstream changes (presumably #118546) made this pull request unmergeable. Please resolve the merge conflicts.

@klensy
Copy link
Contributor

klensy commented Dec 3, 2023

ahash 0.8.4 pulling zerocopy* (which pulls proc-macro2, syn, quote) in small commit tkaitchuck/aHash@a74829b, and now this is included into hashbrown -> stdlib as dependency, not nice :-(

Nope, ahash not used in stdlib.

@a1phyr
Copy link
Contributor Author

a1phyr commented Dec 4, 2023

Rebased on master, this should work thanks to #118546

@the8472 the8472 assigned the8472 and unassigned joshtriplett Jan 20, 2024
@the8472
Copy link
Member

the8472 commented Jan 20, 2024

@bors r+

@bors
Copy link
Contributor

bors commented Jan 20, 2024

📌 Commit 7d369f9 has been approved by the8472

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 20, 2024
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jan 20, 2024
@bors
Copy link
Contributor

bors commented Jan 20, 2024

⌛ Testing commit 7d369f9 with merge 1828461...

@bors
Copy link
Contributor

bors commented Jan 20, 2024

☀️ Test successful - checks-actions
Approved by: the8472
Pushing 1828461 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 20, 2024
@bors bors merged commit 1828461 into rust-lang:master Jan 20, 2024
12 checks passed
@rustbot rustbot added this to the 1.77.0 milestone Jan 20, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (1828461): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -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.5% [0.5%, 0.5%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.5% [0.5%, 0.5%] 1

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)
7.4% [7.4%, 7.4%] 1
Regressions ❌
(secondary)
2.9% [1.8%, 4.0%] 3
Improvements ✅
(primary)
-1.8% [-1.8%, -1.8%] 1
Improvements ✅
(secondary)
-2.5% [-2.5%, -2.4%] 2
All ❌✅ (primary) 2.8% [-1.8%, 7.4%] 2

Cycles

This benchmark run did not return any relevant results for this metric.

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

Bootstrap: 665.65s -> 665.294s (-0.05%)
Artifact size: 308.31 MiB -> 308.36 MiB (0.02%)

@a1phyr a1phyr deleted the hashmap_fold branch March 12, 2024 17:12
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. 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.

None yet

9 participants