Skip to content

Have the alignment intrinsics return ptr::Alignment directly#152641

Draft
scottmcm wants to merge 2 commits intorust-lang:mainfrom
scottmcm:align-gives-alignment
Draft

Have the alignment intrinsics return ptr::Alignment directly#152641
scottmcm wants to merge 2 commits intorust-lang:mainfrom
scottmcm:align-gives-alignment

Conversation

@scottmcm
Copy link
Copy Markdown
Member

@scottmcm scottmcm commented Feb 15, 2026

View all comments

Follow-up to #152605

Notably, a common case of align_of_val is to put it in Layout for allocator calls, so might as well have it just be an Alignment already to avoid the extra transmute.

No changes to rustc_const_eval because that's already writing a Scalar into a place, which does what we need since ptr::Alignment is repr(transparent) to a repr(usize).

@rustbot rustbot added A-test-infra-minicore Area: `minicore` test auxiliary and `//@ add-core-stubs` S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Feb 15, 2026
Comment thread tests/mir-opt/alignment_checks.sized_ptr.CheckAlignment.panic-abort.diff Outdated
@rust-log-analyzer

This comment has been minimized.

@scottmcm scottmcm force-pushed the align-gives-alignment branch from 864bde0 to aa59f29 Compare February 15, 2026 08:37
Comment thread tests/mir-opt/pre-codegen/drop_boxed_slice.rs Outdated
@rust-log-analyzer

This comment has been minimized.

@scottmcm scottmcm force-pushed the align-gives-alignment branch from aa59f29 to 5c5e512 Compare February 15, 2026 09:50
@rust-log-analyzer

This comment has been minimized.

@scottmcm scottmcm force-pushed the align-gives-alignment branch from 5c5e512 to c071e30 Compare February 15, 2026 10:55
@rust-log-analyzer

This comment has been minimized.

@scottmcm scottmcm force-pushed the align-gives-alignment branch from c071e30 to 22ff442 Compare February 15, 2026 18:38
@scottmcm
Copy link
Copy Markdown
Member Author

I don't think anything in here should be more expensive, but in case...
@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Feb 15, 2026
Have the alignment intrinsics return `ptr::Alignment` directly
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Feb 15, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Feb 15, 2026

☀️ Try build successful (CI)
Build commit: 7121e2d (7121e2d136c08d87b9a5f3717916d4bec53334bb, parent: 2219766af622ad1f051ca96ae40650106b1bd9bd)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (7121e2d): 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)
4.5% [0.2%, 16.2%] 4
Regressions ❌
(secondary)
0.6% [0.3%, 0.9%] 2
Improvements ✅
(primary)
-0.4% [-1.2%, -0.2%] 7
Improvements ✅
(secondary)
-1.0% [-3.3%, -0.1%] 22
All ❌✅ (primary) 1.4% [-1.2%, 16.2%] 11

Max RSS (memory usage)

Results (primary -3.9%, secondary 2.9%)

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)
5.2% [1.3%, 9.0%] 2
Improvements ✅
(primary)
-3.9% [-5.4%, -1.6%] 5
Improvements ✅
(secondary)
-1.7% [-1.7%, -1.7%] 1
All ❌✅ (primary) -3.9% [-5.4%, -1.6%] 5

Cycles

Results (primary 11.9%, secondary -1.7%)

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

mean range count
Regressions ❌
(primary)
11.9% [11.9%, 11.9%] 1
Regressions ❌
(secondary)
4.0% [4.0%, 4.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.1% [-4.8%, -2.2%] 4
All ❌✅ (primary) 11.9% [11.9%, 11.9%] 1

Binary size

Results (primary 0.3%, secondary -0.8%)

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

mean range count
Regressions ❌
(primary)
0.6% [0.0%, 1.4%] 14
Regressions ❌
(secondary)
0.2% [0.0%, 0.4%] 8
Improvements ✅
(primary)
-0.5% [-0.7%, -0.1%] 4
Improvements ✅
(secondary)
-1.3% [-2.2%, -0.4%] 17
All ❌✅ (primary) 0.3% [-0.7%, 1.4%] 18

Bootstrap: 485.129s -> 482.811s (-0.48%)
Artifact size: 398.01 MiB -> 396.01 MiB (-0.50%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Feb 15, 2026
@scottmcm
Copy link
Copy Markdown
Member Author

scottmcm commented Feb 15, 2026

r? @cjgillot
@rustbot ready

Those perf results are, I think, overall good. They're mostly green, and include things like -28% on rustc_mir_build, which is impressively good.

The one big regression is one of the LTO sub-jobs just going nuts for some reason:
image

TBH I'm not sure how this could possibly cause that. It's not the kind of "oh, inlining reshuffled everything" that we normally see from MIR changes. None of the other variants of that code show any material impact, and it's just so different from the results on everything else.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 15, 2026
@scottmcm scottmcm marked this pull request as ready for review February 15, 2026 22:03
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Feb 15, 2026

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo, @GuillaumeGomez

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

This PR modifies tests/auxiliary/minicore.rs.

cc @jieyouxu

Some changes occurred to the intrinsics. Make sure the CTFE / Miri interpreter
gets adapted for the changes, if necessary.

cc @rust-lang/miri, @RalfJung, @oli-obk, @lcnr

@scottmcm scottmcm force-pushed the align-gives-alignment branch from 22ff442 to ad4a3fc Compare May 9, 2026 07:06
@rust-log-analyzer

This comment has been minimized.

@scottmcm scottmcm force-pushed the align-gives-alignment branch from ad4a3fc to 0a9149f Compare May 9, 2026 07:16
@scottmcm
Copy link
Copy Markdown
Member Author

scottmcm commented May 9, 2026

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 9, 2026
rust-bors Bot pushed a commit that referenced this pull request May 9, 2026
Have the alignment intrinsics return `ptr::Alignment` directly
@rust-log-analyzer

This comment has been minimized.

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 9, 2026

☀️ Try build successful (CI)
Build commit: a606286 (a60628660b41f808eeed74cac626bfc49b619ef6, parent: 4a997eeefbb8cf41617324bb6d08c72171c614e2)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (a606286): comparison URL.

Overall result: ❌✅ regressions and improvements - please read:

Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf.

Next, please: If you can, justify the regressions found in this try perf run in writing along with @rustbot label: +perf-regression-triaged. If not, fix the regressions and do another perf run. Neutral or positive results will clear the label automatically.

@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)
15.9% [15.9%, 15.9%] 1
Regressions ❌
(secondary)
0.2% [0.2%, 0.2%] 2
Improvements ✅
(primary)
-0.4% [-0.5%, -0.3%] 3
Improvements ✅
(secondary)
-1.3% [-3.9%, -0.2%] 17
All ❌✅ (primary) 3.7% [-0.5%, 15.9%] 4

Max RSS (memory usage)

Results (primary -0.0%, secondary -3.5%)

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

mean range count
Regressions ❌
(primary)
2.5% [2.3%, 2.7%] 3
Regressions ❌
(secondary)
0.9% [0.9%, 0.9%] 1
Improvements ✅
(primary)
-2.0% [-2.7%, -0.8%] 4
Improvements ✅
(secondary)
-4.9% [-9.3%, -2.6%] 3
All ❌✅ (primary) -0.0% [-2.7%, 2.7%] 7

Cycles

Results (primary 11.9%, secondary -3.1%)

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

mean range count
Regressions ❌
(primary)
11.9% [11.9%, 11.9%] 1
Regressions ❌
(secondary)
3.2% [3.2%, 3.2%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.0% [-5.1%, -2.4%] 7
All ❌✅ (primary) 11.9% [11.9%, 11.9%] 1

Binary size

Results (primary 0.2%, secondary -0.5%)

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

mean range count
Regressions ❌
(primary)
0.4% [0.0%, 1.4%] 26
Regressions ❌
(secondary)
0.2% [0.0%, 0.4%] 12
Improvements ✅
(primary)
-0.1% [-0.4%, -0.0%] 16
Improvements ✅
(secondary)
-1.0% [-2.6%, -0.0%] 18
All ❌✅ (primary) 0.2% [-0.4%, 1.4%] 42

Bootstrap: 497.359s -> 498.748s (0.28%)
Artifact size: 397.13 MiB -> 397.19 MiB (0.02%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 9, 2026
@scottmcm scottmcm force-pushed the align-gives-alignment branch from 0a9149f to 8718f45 Compare May 9, 2026 14:25
@rust-log-analyzer

This comment has been minimized.

@scottmcm scottmcm force-pushed the align-gives-alignment branch from 8718f45 to 223c257 Compare May 9, 2026 18:57
@rust-log-analyzer

This comment has been minimized.

@scottmcm scottmcm force-pushed the align-gives-alignment branch from 223c257 to dba6102 Compare May 10, 2026 05:09
@scottmcm
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 May 10, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request May 10, 2026
Have the alignment intrinsics return `ptr::Alignment` directly
@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

The job x86_64-gnu-miri failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
tests/pass/shims/x86/rounding-error.rs ... ok
tests/pass/shims/x86/intrinsics-x86-gfni.rs ... ok

FAILED TEST: tests/pass/alloc-access-tracking.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp/miri-uitest-8fGvbH" RUST_BACKTRACE="1" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/miri" "--error-format=json" "--sysroot=/checkout/obj/build/x86_64-unknown-linux-gnu/miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/tmp/miri_ui/0/tests/pass" "tests/pass/alloc-access-tracking.rs" "-Zmiri-track-alloc-accesses" "--edition" "2021"

error: actual output differed from expected
Execute `./miri test --bless` to update `tests/pass/alloc-access-tracking.stderr` to the actual output
--- tests/pass/alloc-access-tracking.stderr
+++ <stderr output>
---
   |
LL |         utils::miri_track_alloc(ptr);
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tracking was triggered here

note: write access at alloc199[0x0..0x1]
  --> tests/pass/alloc-access-tracking.rs:11:9
   |
LL |         *ptr = 42; // Crucially, only a write is printed here, no read!
   |         ^^^^^^^^^ tracking was triggered here

note: read access at alloc199[0x0..0x1]
  --> tests/pass/alloc-access-tracking.rs:12:9
   |
LL |         assert_eq!(*ptr, 42);
   |         ^^^^^^^^^^^^^^^^^^^^ tracking was triggered here

---
   |
   = note: stack backtrace:
           0: <std::boxed::Box<std::mem::MaybeUninit<[u8; 123]>> as std::ops::Drop>::drop
               at /checkout/library/alloc/src/boxed.rs:1956:17: 1956:79
           1: std::ptr::drop_glue::<std::boxed::Box<std::mem::MaybeUninit<[u8; 123]>>> - shim(Some(std::boxed::Box<std::mem::MaybeUninit<[u8; 123]>>))
               at /checkout/library/core/src/ptr/mod.rs:825:1: 827:25
           2: main
               at tests/pass/alloc-access-tracking.rs:13:5: 13:6


---
   |
LL |         utils::miri_track_alloc(ptr);
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tracking was triggered here

note: write access at alloc199[0x0..0x1]
  --> tests/pass/alloc-access-tracking.rs:11:9
   |
LL |         *ptr = 42; // Crucially, only a write is printed here, no read!
   |         ^^^^^^^^^ tracking was triggered here

note: read access at alloc199[0x0..0x1]
  --> tests/pass/alloc-access-tracking.rs:12:9
   |
LL |         assert_eq!(*ptr, 42);
   |         ^^^^^^^^^^^^^^^^^^^^ tracking was triggered here

---
   |
   = note: stack backtrace:
           0: <std::boxed::Box<std::mem::MaybeUninit<[u8; 123]>> as std::ops::Drop>::drop
               at /checkout/library/alloc/src/boxed.rs:1956:17: 1956:79
           1: std::ptr::drop_glue::<std::boxed::Box<std::mem::MaybeUninit<[u8; 123]>>> - shim(Some(std::boxed::Box<std::mem::MaybeUninit<[u8; 123]>>))
               at /checkout/library/core/src/ptr/mod.rs:825:1: 827:25
           2: main
               at tests/pass/alloc-access-tracking.rs:13:5: 13:6


---
Location:
   /cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ui_test-0.30.4/src/lib.rs:365

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   1: <color_eyre[3baf1ac4a67c392b]::config::EyreHook>::into_eyre_hook::{closure#0}<unknown>
      at <unknown source file>:<unknown line>
   2: eyre[750f75771dd51b5c]::capture_handler<unknown>
      at <unknown source file>:<unknown line>
   3: eyre[750f75771dd51b5c]::private::format_err<unknown>
      at <unknown source file>:<unknown line>
   4: ui_test[2db925eb1bf77098]::run_tests_generic::<ui_test[2db925eb1bf77098]::default_file_filter, ui[85ef28d17faeaf69]::run_tests::{closure#1}, alloc[6f3730ed6c509d98]::boxed::Box<dyn ui_test[2db925eb1bf77098]::status_emitter::StatusEmitter>><unknown>
      at <unknown source file>:<unknown line>
   5: ui[85ef28d17faeaf69]::ui<unknown>
      at <unknown source file>:<unknown line>
   6: ui[85ef28d17faeaf69]::main<unknown>
      at <unknown source file>:<unknown line>
   7: std[ce2e4a3fcfbc8ce7]::sys::backtrace::__rust_begin_short_backtrace::<fn() -> core[1f398f8c6d30aea1]::result::Result<(), eyre[750f75771dd51b5c]::Report>, core[1f398f8c6d30aea1]::result::Result<(), eyre[750f75771dd51b5c]::Report>><unknown>
      at <unknown source file>:<unknown line>
   8: std[ce2e4a3fcfbc8ce7]::rt::lang_start::<core[1f398f8c6d30aea1]::result::Result<(), eyre[750f75771dd51b5c]::Report>>::{closure#0}<unknown>
      at <unknown source file>:<unknown line>
   9: std[ce2e4a3fcfbc8ce7]::rt::lang_start_internal<unknown>
      at <unknown source file>:<unknown line>
  10: main<unknown>
      at <unknown source file>:<unknown line>
  11: __libc_start_main<unknown>
      at <unknown source file>:<unknown line>
  12: _start<unknown>
      at <unknown source file>:<unknown line>

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Run with RUST_BACKTRACE=full to include source snippets.
error: test failed, to rerun pass `--test ui`

Caused by:
  process didn't exit successfully: `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/ui-c1d1550a3ddadc4f` (exit status: 1)
Bootstrap failed while executing `test --stage 2 src/tools/miri src/tools/miri/cargo-miri`
Command `/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo test -Zwarnings --target x86_64-unknown-linux-gnu -Zbinary-dep-depinfo -j 4 -Zroot-dir=/checkout --locked --color=always --profile=release --manifest-path /checkout/src/tools/miri/Cargo.toml -- [workdir=/checkout]` failed with exit code 1
Created at: src/bootstrap/src/core/build_steps/tool.rs:191:21
Executed at: src/bootstrap/src/core/build_steps/test.rs:740:19

--- BACKTRACE vvv
   0: <bootstrap::utils::exec::DeferredCommand>::finish_process
             at /checkout/src/bootstrap/src/utils/exec.rs:939:17
   1: <bootstrap::utils::exec::DeferredCommand>::wait_for_output::<&bootstrap::utils::exec::ExecutionContext>
             at /checkout/src/bootstrap/src/utils/exec.rs:831:21
   2: <bootstrap::utils::exec::ExecutionContext>::run
             at /checkout/src/bootstrap/src/utils/exec.rs:741:45
   3: <bootstrap::utils::exec::BootstrapCommand>::run::<&bootstrap::core::builder::Builder>
             at /checkout/src/bootstrap/src/utils/exec.rs:339:27
   4: <bootstrap::core::build_steps::test::Miri as bootstrap::core::builder::Step>::run
             at /checkout/src/bootstrap/src/core/build_steps/test.rs:740:19
   5: <bootstrap::core::builder::Builder>::ensure::<bootstrap::core::build_steps::test::Miri>
             at /checkout/src/bootstrap/src/core/builder/mod.rs:1595:36
   6: <bootstrap::core::build_steps::test::Miri as bootstrap::core::builder::Step>::make_run
             at /checkout/src/bootstrap/src/core/build_steps/test.rs:666:21
   7: <bootstrap::core::builder::StepDescription>::maybe_run
             at /checkout/src/bootstrap/src/core/builder/mod.rs:476:13
   8: bootstrap::core::builder::cli_paths::match_paths_to_steps_and_run
             at /checkout/src/bootstrap/src/core/builder/cli_paths.rs:232:18
   9: <bootstrap::core::builder::Builder>::run_step_descriptions
             at /checkout/src/bootstrap/src/core/builder/mod.rs:1138:9
  10: <bootstrap::core::builder::Builder>::execute_cli
             at /checkout/src/bootstrap/src/core/builder/mod.rs:1117:14
  11: <bootstrap::Build>::build
             at /checkout/src/bootstrap/src/lib.rs:803:25
  12: bootstrap::main
             at /checkout/src/bootstrap/src/bin/main.rs:130:11
  13: <fn() as core::ops::function::FnOnce<()>>::call_once
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/core/src/ops/function.rs:250:5
  14: std::sys::backtrace::__rust_begin_short_backtrace::<fn(), ()>
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/std/src/sys/backtrace.rs:166:18
  15: std::rt::lang_start::<()>::{closure#0}
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/std/src/rt.rs:206:18
  16: <&dyn core::ops::function::Fn<(), Output = i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe as core::ops::function::FnOnce<()>>::call_once
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/core/src/ops/function.rs:287:21
  17: std::panicking::catch_unwind::do_call::<&dyn core::ops::function::Fn<(), Output = i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe, i32>
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/std/src/panicking.rs:581:40
  18: std::panicking::catch_unwind::<i32, &dyn core::ops::function::Fn<(), Output = i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe>
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/std/src/panicking.rs:544:19
  19: std::panic::catch_unwind::<&dyn core::ops::function::Fn<(), Output = i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe, i32>
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/std/src/panic.rs:359:14
  20: std::rt::lang_start_internal::{closure#0}
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/std/src/rt.rs:175:24
  21: std::panicking::catch_unwind::do_call::<std::rt::lang_start_internal::{closure#0}, isize>
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/std/src/panicking.rs:581:40
---
  28: __libc_start_main
  29: _start


Command has failed. Rerun with -v to see more details.
Build completed unsuccessfully in 0:48:29
  local time: Sun May 10 06:01:39 UTC 2026
  network time: Sun, 10 May 2026 06:01:39 GMT
##[error]Process completed with exit code 1.
##[group]Run echo "disk usage:"

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 10, 2026

☀️ Try build successful (CI)
Build commit: a1b0fb1 (a1b0fb110184ac3bacbafba05300db9eccadb311, parent: ce89c898570852a1bb441d77570596e50bf362c2)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (a1b0fb1): comparison URL.

Overall result: ❌✅ regressions and improvements - please read:

Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf.

Next, please: If you can, justify the regressions found in this try perf run in writing along with @rustbot label: +perf-regression-triaged. If not, fix the regressions and do another perf run. Neutral or positive results will clear the label automatically.

@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)
8.2% [0.1%, 16.3%] 2
Regressions ❌
(secondary)
0.1% [0.1%, 0.2%] 5
Improvements ✅
(primary)
-0.4% [-0.4%, -0.4%] 2
Improvements ✅
(secondary)
-1.1% [-3.9%, -0.1%] 19
All ❌✅ (primary) 3.9% [-0.4%, 16.3%] 4

Max RSS (memory usage)

Results (primary 0.4%, secondary -1.8%)

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

mean range count
Regressions ❌
(primary)
5.3% [2.3%, 10.2%] 3
Regressions ❌
(secondary)
1.7% [0.9%, 2.4%] 2
Improvements ✅
(primary)
-2.5% [-3.7%, -1.0%] 5
Improvements ✅
(secondary)
-8.8% [-8.8%, -8.8%] 1
All ❌✅ (primary) 0.4% [-3.7%, 10.2%] 8

Cycles

Results (primary 12.1%, secondary -1.9%)

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

mean range count
Regressions ❌
(primary)
12.1% [12.1%, 12.1%] 1
Regressions ❌
(secondary)
3.3% [3.3%, 3.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.8% [-4.5%, -1.2%] 6
All ❌✅ (primary) 12.1% [12.1%, 12.1%] 1

Binary size

Results (primary 0.2%, secondary -0.5%)

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

mean range count
Regressions ❌
(primary)
0.4% [0.0%, 1.4%] 34
Regressions ❌
(secondary)
0.2% [0.0%, 0.4%] 12
Improvements ✅
(primary)
-0.2% [-0.6%, -0.0%] 16
Improvements ✅
(secondary)
-1.0% [-2.6%, -0.0%] 19
All ❌✅ (primary) 0.2% [-0.6%, 1.4%] 50

Bootstrap: 498.161s -> 498.108s (-0.01%)
Artifact size: 397.12 MiB -> 397.26 MiB (0.04%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-test-infra-minicore Area: `minicore` test auxiliary and `//@ add-core-stubs` perf-regression Performance regression. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. 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