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

Use OnceLock for SingleCache #115422

Merged
merged 1 commit into from
Sep 2, 2023
Merged

Use OnceLock for SingleCache #115422

merged 1 commit into from
Sep 2, 2023

Conversation

Zoxc
Copy link
Contributor

@Zoxc Zoxc commented Sep 1, 2023

This uses OnceLock for SingleCache instead of Lock<Option<T>> so lookups are lock-free.

r? @cjgillot

@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) 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 Sep 1, 2023
@cjgillot
Copy link
Contributor

cjgillot commented Sep 1, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Sep 1, 2023

📌 Commit 90f5f94 has been approved by cjgillot

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 Sep 1, 2023
fmease added a commit to fmease/rust that referenced this pull request Sep 2, 2023
Use `OnceLock` for `SingleCache`

This uses `OnceLock` for `SingleCache` instead of `Lock<Option<T>>` so lookups are lock-free.

r? `@cjgillot`
fmease added a commit to fmease/rust that referenced this pull request Sep 2, 2023
Use `OnceLock` for `SingleCache`

This uses `OnceLock` for `SingleCache` instead of `Lock<Option<T>>` so lookups are lock-free.

r? ``@cjgillot``
@bors
Copy link
Contributor

bors commented Sep 2, 2023

⌛ Testing commit 90f5f94 with merge 9dc11a1...

@bors
Copy link
Contributor

bors commented Sep 2, 2023

☀️ Test successful - checks-actions
Approved by: cjgillot
Pushing 9dc11a1 to master...

1 similar comment
@bors
Copy link
Contributor

bors commented Sep 2, 2023

☀️ Test successful - checks-actions
Approved by: cjgillot
Pushing 9dc11a1 to master...

@bors bors added merged-by-bors This PR was explicitly merged by bors. labels Sep 2, 2023
@bors bors merged commit 9dc11a1 into rust-lang:master Sep 2, 2023
11 checks passed
@rustbot rustbot added this to the 1.74.0 milestone Sep 2, 2023
@Zoxc Zoxc deleted the cache-once-lock branch September 2, 2023 05:04
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (9dc11a1): comparison URL.

Overall result: ✅ improvements - 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
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.4% [-0.4%, -0.4%] 2
Improvements ✅
(secondary)
-0.5% [-0.6%, -0.3%] 8
All ❌✅ (primary) -0.4% [-0.4%, -0.4%] 2

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)
1.9% [1.2%, 2.3%] 3
Regressions ❌
(secondary)
7.7% [7.7%, 7.7%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.9% [-4.9%, -4.9%] 1
All ❌✅ (primary) 1.9% [1.2%, 2.3%] 3

Cycles

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

Binary size

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

Bootstrap: 629.86s -> 631.705s (0.29%)
Artifact size: 316.61 MiB -> 316.63 MiB (0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) 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-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.

5 participants