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

Pass DepContext and QueryContext by value when practical #108058

Merged
merged 1 commit into from
Feb 17, 2023

Conversation

Zoxc
Copy link
Contributor

@Zoxc Zoxc commented Feb 14, 2023

This removes some indirections for a minor performance improvement.

BenchmarkBeforeAfter
TimeTime%
🟣 clap:check1.8294s1.8255s -0.21%
🟣 hyper:check0.2667s0.2669s 0.07%
🟣 regex:check1.0080s1.0063s -0.17%
🟣 syn:check1.6335s1.6295s -0.24%
🟣 syntex_syntax:check6.3633s6.3344s -0.45%
Total11.1009s11.0627s -0.34%
Summary1.0000s0.9980s -0.20%

@rustbot
Copy link
Collaborator

rustbot commented Feb 14, 2023

r? @compiler-errors

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

@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 Feb 14, 2023
@cjgillot
Copy link
Contributor

@bors try @rust-timer queue

r=me if perf is green.

@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 Feb 14, 2023
@bors
Copy link
Contributor

bors commented Feb 14, 2023

⌛ Trying commit b3a4fe7 with merge 1743e75d256ff90f58bdd38a087532b36b9d731f...

@Noratrieb
Copy link
Member

Interesting that this is also a perf improvement (well, maybe the pgo pipeline makes it go away), guess it doess make sense, I've wanted to this for cleanup reasons for a while :D

@bors
Copy link
Contributor

bors commented Feb 14, 2023

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

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (1743e75d256ff90f58bdd38a087532b36b9d731f): comparison URL.

Overall result: ❌ regressions - 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 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)
1.5% [1.5%, 1.5%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

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.1% [2.1%, 2.1%] 1
Regressions ❌
(secondary)
6.5% [6.5%, 6.5%] 1
Improvements ✅
(primary)
-2.8% [-2.8%, -2.8%] 1
Improvements ✅
(secondary)
-2.5% [-2.7%, -2.3%] 8
All ❌✅ (primary) -0.3% [-2.8%, 2.1%] 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
Improvements ✅
(secondary)
-2.8% [-2.8%, -2.8%] 1
All ❌✅ (primary) - - 0

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Feb 15, 2023
@cjgillot
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Feb 15, 2023

📌 Commit b3a4fe7 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 Feb 15, 2023
@bors
Copy link
Contributor

bors commented Feb 15, 2023

⌛ Testing commit b3a4fe7 with merge cd3299127ac7eff581dd6b48fe3e0ca2216eb3a4...

@bors
Copy link
Contributor

bors commented Feb 15, 2023

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 15, 2023
@compiler-errors
Copy link
Member

 Copying stage0 library from stage0 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
[TIMING] compile::StdLink { compiler: Compiler { stage: 0, host: x86_64-unknown-linux-gnu }, target_compiler: Compiler { stage: 0, host: x86_64-unknown-linux-gnu }, target: x86_64-unknown-linux-gnu, crates: [] } -- 0.000
[TIMING] compile::Std { target: x86_64-unknown-linux-gnu, compiler: Compiler { stage: 0, host: x86_64-unknown-linux-gnu }, crates: [] } -- 44.937
downloading https://ci-artifacts.rust-lang.org/rustc-builds-alt/47c0792aaa74e30615e237de57e895de8af16578/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz
curl: (22) The requested URL returned error: 404 

Spurious?

@bors retry spurious 404

@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 Feb 15, 2023
@rust-log-analyzer
Copy link
Collaborator

The job wasm32 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
curl: (22) The requested URL returned error: 404 

error: failed to download llvm from ci

    help: old builds get deleted after a certain time
    help: if trying to compile an old commit of rustc, disable `download-ci-llvm` in config.toml:


    [llvm]
    download-ci-llvm = false

@bors
Copy link
Contributor

bors commented Feb 17, 2023

⌛ Testing commit b3a4fe7 with merge b5c8c32...

@bors
Copy link
Contributor

bors commented Feb 17, 2023

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 17, 2023
@bors bors merged commit b5c8c32 into rust-lang:master Feb 17, 2023
@rustbot rustbot added this to the 1.69.0 milestone Feb 17, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (b5c8c32): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

Max RSS (memory usage)

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

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

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.

8 participants