Skip to content

Conversation

@saethlin
Copy link
Member

@saethlin saethlin commented Oct 12, 2025

I noticed this while picking through the IR we generate for #134938. I think we just forgot to apply this trick to RangeFrom?

@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 Oct 12, 2025
@scottmcm
Copy link
Member

@bors r+ rollup=iffy

@bors
Copy link
Collaborator

bors commented Oct 14, 2025

📌 Commit 4f1b945 has been approved by scottmcm

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 Oct 14, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Oct 14, 2025
…ottmcm

Avoid redundant UB check in RangeFrom slice indexing

I noticed this while picking through the IR we generate for rust-lang#134938. I think we just forgot to apply this trick to `RangeFrom`?
bors added a commit that referenced this pull request Oct 14, 2025
Rollup of 11 pull requests

Successful merges:

 - #146277 (Enable `u64` limbs in `core::num::bignum`)
 - #146976 (constify basic Clone impls)
 - #147249 (Do two passes of `handle_opaque_type_uses_next`)
 - #147266 (fix 2 search graph bugs)
 - #147468 (Implement fs api set_times and set_times_nofollow)
 - #147497 (`proc_macro` cleanups (3/N))
 - #147594 (std: implement `pal::os::exit` for VEXos)
 - #147596 (Adjust the Arm targets in CI to reflect latest changes)
 - #147607 (GVN: Invalidate derefs at loop headers)
 - #147620 (Avoid redundant UB check in RangeFrom slice indexing)
 - #147647 (Hide vendoring and copyright in GHA group)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 14, 2025
…ottmcm

Avoid redundant UB check in RangeFrom slice indexing

I noticed this while picking through the IR we generate for rust-lang#134938. I think we just forgot to apply this trick to `RangeFrom`?
bors added a commit that referenced this pull request Oct 14, 2025
Rollup of 12 pull requests

Successful merges:

 - #146277 (Enable `u64` limbs in `core::num::bignum`)
 - #146976 (constify basic Clone impls)
 - #147249 (Do two passes of `handle_opaque_type_uses_next`)
 - #147266 (fix 2 search graph bugs)
 - #147497 (`proc_macro` cleanups (3/N))
 - #147546 (Suppress unused_parens for labeled break)
 - #147548 (Fix ICE for never pattern as closure parameters)
 - #147594 (std: implement `pal::os::exit` for VEXos)
 - #147596 (Adjust the Arm targets in CI to reflect latest changes)
 - #147607 (GVN: Invalidate derefs at loop headers)
 - #147620 (Avoid redundant UB check in RangeFrom slice indexing)
 - #147647 (Hide vendoring and copyright in GHA group)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 4a67c01 into rust-lang:master Oct 14, 2025
10 checks passed
@rustbot rustbot added this to the 1.92.0 milestone Oct 14, 2025
rust-timer added a commit that referenced this pull request Oct 14, 2025
Rollup merge of #147620 - saethlin:RangeFrom-noubcheck, r=scottmcm

Avoid redundant UB check in RangeFrom slice indexing

I noticed this while picking through the IR we generate for #134938. I think we just forgot to apply this trick to `RangeFrom`?
@saethlin
Copy link
Member Author

@rust-timer build 55b1ddf

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (55b1ddf): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @rustbot label: +perf-regression-triaged. If not, please fix the regressions and do another perf run. If its results are neutral or positive, the label will be automatically removed.

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

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
0.4% [0.3%, 0.6%] 2
Regressions ❌
(secondary)
0.2% [0.0%, 0.6%] 3
Improvements ✅
(primary)
-0.3% [-0.3%, -0.2%] 2
Improvements ✅
(secondary)
-0.1% [-0.1%, -0.1%] 2
All ❌✅ (primary) 0.1% [-0.3%, 0.6%] 4

Max RSS (memory usage)

Results (primary 2.6%, secondary -3.6%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
4.8% [3.7%, 6.0%] 2
Regressions ❌
(secondary)
2.3% [2.1%, 2.4%] 2
Improvements ✅
(primary)
-1.9% [-1.9%, -1.9%] 1
Improvements ✅
(secondary)
-4.7% [-5.8%, -3.6%] 11
All ❌✅ (primary) 2.6% [-1.9%, 6.0%] 3

Cycles

Results (secondary -0.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.5% [2.1%, 4.2%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.3% [-7.4%, -1.5%] 4
All ❌✅ (primary) - - 0

Binary size

Results (primary -0.1%, secondary -0.2%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.2% [0.0%, 0.6%] 10
Regressions ❌
(secondary)
1.7% [0.1%, 3.2%] 2
Improvements ✅
(primary)
-0.2% [-0.6%, -0.0%] 38
Improvements ✅
(secondary)
-0.3% [-0.4%, -0.0%] 55
All ❌✅ (primary) -0.1% [-0.6%, 0.6%] 48

Bootstrap: 475.635s -> 475.478s (-0.03%)
Artifact size: 388.48 MiB -> 388.13 MiB (-0.09%)

@rustbot rustbot added the perf-regression Performance regression. label Oct 15, 2025
@Mark-Simulacrum Mark-Simulacrum added the perf-regression-triaged The performance regression has been triaged. label Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. 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.

6 participants