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

Remove VecMap #109280

Merged
merged 1 commit into from
Mar 22, 2023
Merged

Remove VecMap #109280

merged 1 commit into from
Mar 22, 2023

Conversation

compiler-errors
Copy link
Member

Not sure what the use of this data structure is over just using FxIndexMap or a Vec.

r? @ghost

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 17, 2023
@compiler-errors
Copy link
Member Author

@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 Mar 17, 2023
@bors
Copy link
Contributor

bors commented Mar 17, 2023

⌛ Trying commit 6639538 with merge d1fbeb4125f24c53c41b7080d5e7b63753eb29bb...

@Mark-Simulacrum
Copy link
Member

In general for small lengths the VecMap may be a win, since it avoids hashing and keeps items densely populated. This is especially true for small integer-like keys where iteration and comparison is likely to be very fast.

But I suppose we can look at what perf comes back with at least to see whether any current benchmarks are negatively (or positively) affected.

I suspect that for most compiler usage even if we wanted this we'd want it to be a hybrid between VecMap and FxIndexMap depending on length.

@bors
Copy link
Contributor

bors commented Mar 17, 2023

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

@rust-timer

This comment has been minimized.

@compiler-errors
Copy link
Member Author

In general for small lengths the VecMap may be a win, since it avoids hashing and keeps items densely populated. This is especially true for small integer-like keys where iteration and comparison is likely to be very fast.

Cool, thanks for the context. Yeah, I was just putting this up to see what would happen. If there is a perf hit, I wonder then, conversely, if there may be some benefit in backing VecMap with SmallVec. Anyways, I guess we'll see.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (d1fbeb4125f24c53c41b7080d5e7b63753eb29bb): 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)
2.0% [0.4%, 3.6%] 5
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.1% [-2.1%, -2.1%] 1
All ❌✅ (primary) 2.0% [0.4%, 3.6%] 5

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

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 18, 2023
@compiler-errors
Copy link
Member Author

compiler-errors commented Mar 18, 2023

shrug, i still prefer to remove VecMap because it's only used for opaques, and it isn't hot enough to justify its special behavior

r? compiler

@Mark-Simulacrum
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Mar 18, 2023

📌 Commit 6639538 has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@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 Mar 18, 2023
@Noratrieb
Copy link
Member

perf was neutral
@bors rollup=maybe

Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Mar 21, 2023
…-Simulacrum

Remove `VecMap`

Not sure what the use of this data structure is over just using `FxIndexMap` or a `Vec`.

r? `@ghost`
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Mar 22, 2023
…-Simulacrum

Remove `VecMap`

Not sure what the use of this data structure is over just using `FxIndexMap` or a `Vec`.

r? ``@ghost``
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 22, 2023
Rollup of 11 pull requests

Successful merges:

 - rust-lang#100311 (Fix handling of trailing bare CR in str::lines)
 - rust-lang#108997 (Change text -> rust highlighting in sanitizer.md)
 - rust-lang#109179 (move Option::as_slice to intrinsic)
 - rust-lang#109187 (Render source page layout with Askama)
 - rust-lang#109280 (Remove `VecMap`)
 - rust-lang#109295 (refactor `fn bootstrap::builder::Builder::compiler_for` logic)
 - rust-lang#109312 (rustdoc: Cleanup parent module tracking for doc links)
 - rust-lang#109317 (Update links for custom discriminants.)
 - rust-lang#109405 (RPITITs are `DefKind::Opaque` with new lowering strategy)
 - rust-lang#109414 (Do not consider synthesized RPITITs on missing items checks)
 - rust-lang#109435 (Detect uninhabited types early in const eval)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 70918ec into rust-lang:master Mar 22, 2023
@rustbot rustbot added this to the 1.70.0 milestone Mar 22, 2023
@compiler-errors compiler-errors deleted the no-vec-map branch August 11, 2023 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants