Skip to content

PatRangeBoundary::compare_with: als add a fast-path for signed integers#124190

Merged
bors merged 1 commit into
rust-lang:masterfrom
RalfJung:pat-compare-with-fast-path
Apr 20, 2024
Merged

PatRangeBoundary::compare_with: als add a fast-path for signed integers#124190
bors merged 1 commit into
rust-lang:masterfrom
RalfJung:pat-compare-with-fast-path

Conversation

@RalfJung

Copy link
Copy Markdown
Member

Not sure if we have a benchmark that hits this... but it seems odd to only do this for unsigned integers.

@rustbot

rustbot commented Apr 20, 2024

Copy link
Copy Markdown
Collaborator

r? @pnkfelix

rustbot has assigned @pnkfelix.
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-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 20, 2024
@RalfJung

Copy link
Copy Markdown
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 Apr 20, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 20, 2024
… r=<try>

PatRangeBoundary::compare_with: als add a fast-path for signed integers

Not sure if we have a benchmark that hits this... but it seems odd to only do this for unsigned integers.
@bors

bors commented Apr 20, 2024

Copy link
Copy Markdown
Collaborator

⌛ Trying commit 727fe81 with merge f937f6f...

@bors

bors commented Apr 20, 2024

Copy link
Copy Markdown
Collaborator

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

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (f937f6f): 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)

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

Binary size

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

Bootstrap: 670.156s -> 670.23s (0.01%)
Artifact size: 315.30 MiB -> 315.27 MiB (-0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Apr 20, 2024
@RalfJung

Copy link
Copy Markdown
Member Author

Seems like we don't have a benchmark. Or is there some reason this would not actually be helpful?

Cc @Nadrieril since you've been doing a bunch of work on THIR patterns recently.

@Nadrieril

Copy link
Copy Markdown
Member

Yeah, I've seen this fast path around for a while. I think it impacts the unicode_normalization benchmark which only exercises the unsigned case.

If it's useful for unsigned, it's useful for signed surely.

@bors r+

@bors

bors commented Apr 20, 2024

Copy link
Copy Markdown
Collaborator

📌 Commit 727fe81 has been approved by Nadrieril

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 Apr 20, 2024
@bors

bors commented Apr 20, 2024

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 727fe81 with merge c3ceb00...

@bors

bors commented Apr 20, 2024

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: Nadrieril
Pushing c3ceb00 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 20, 2024
@bors bors merged commit c3ceb00 into rust-lang:master Apr 20, 2024
@rustbot rustbot added this to the 1.79.0 milestone Apr 20, 2024
@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (c3ceb00): 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
Improvements ✅
(secondary)
-3.3% [-3.3%, -3.3%] 1
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)
4.1% [4.1%, 4.1%] 1
Regressions ❌
(secondary)
3.3% [3.3%, 3.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 4.1% [4.1%, 4.1%] 1

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: 672.18s -> 672.07s (-0.02%)
Artifact size: 315.24 MiB -> 315.18 MiB (-0.02%)

@RalfJung RalfJung deleted the pat-compare-with-fast-path branch April 21, 2024 08:03
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-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.

6 participants