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

Null terminate core::panic::Location file strings #117431

Closed
wants to merge 1 commit into from

Conversation

Noratrieb
Copy link
Member

@Noratrieb Noratrieb commented Oct 31, 2023

This shrinks Location by a usize, making it 24->16 bytes on x86-64. This reduces binary size. I quickly measure cargo install ripgrep, which was reduced by 0.3%. That's not a lot, but it's something and the code change is quite simple. From some quick measurements, I expect librustc_driver to shrink by more, but rustc-perf should give us more numbers.

The change to const interning is necessary, see https://rust-lang.zulipchat.com/#narrow/stream/146212-t-compiler.2Fconst-eval/topic/unsupported.20untyped.20pointer.20in.20constant.20error/near/399446285

@Noratrieb
Copy link
Member Author

@bors try @rust-timer queue

@rustbot
Copy link
Collaborator

rustbot commented Oct 31, 2023

r? @cuviper

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

@rust-timer

This comment has been minimized.

@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. T-libs Relevant to the library team, which will review and decide on the PR/issue. S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Oct 31, 2023
@bors
Copy link
Contributor

bors commented Oct 31, 2023

⌛ Trying commit ccff2ba with merge c21c3a1...

bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 31, 2023
Null terminate `core::panic::Location` file strings

This shrinks `Location` by a usize, making it 24->16 bytes on x86-64. This reduces binary size. I quickly measure `cargo install ripgrep`, which was reduced by 0.3%. That's not a lot, but it's something and the code change is quite simple. From some quick measurements, I expect librustc_driver to shrink by more, but rustc-perf should reveal more.

The change to const interning is necessary, see https://rust-lang.zulipchat.com/#narrow/stream/146212-t-compiler.2Fconst-eval/topic/unsupported.20untyped.20pointer.20in.20constant.20error/near/399446285
@rustbot
Copy link
Collaborator

rustbot commented Oct 31, 2023

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

// For better errors later, mark the allocation as immutable.
alloc.mutability = Mutability::Not;
// The Location does have leftover allocations, but that's fine, as we control it.
if alloc_kind != MemoryKind::CallerLocation {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh, this is bad. That code is already terrible and my attempts at cleaning it up in #116745 are kind of stuck. I really don't like adding more complications here.

MemoryKind::CallerLocation,
Mutability::Not,
)
.unwrap()
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can avoid the interning change by instead manually interning the inner allocation with the string here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that sounds good. how exactly do i do the interning? is it the

            let alloc = tcx.mk_const_alloc(alloc);
            tcx.set_alloc_id_memory(alloc_id, alloc);

part?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that's the core thing. We have some helpers in interpret/intern.rs. Possible one of the existing one needs extension, currently there's basically 2 helpers for 2 users but it'd be good to start establishing some patterns. (That can also happen later though.)

@rust-log-analyzer

This comment has been minimized.

#[cfg(not(bootstrap))]
pub struct Location<'a> {
file: *const (),
_file_actual: PhantomData<&'a CStr>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does Location have a lifetime? Isn't it always 'static?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know either - but it's stable :(

This saves 8 bytes in `Location` and allows for deduplicating file names
more effectively through the linker in the future (by placing them in
special seections).
@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
GITHUB_ACTION=__run_7
GITHUB_ACTIONS=true
GITHUB_ACTION_REF=
GITHUB_ACTION_REPOSITORY=
GITHUB_ACTOR=rust-cloud-vms[bot]
GITHUB_API_URL=https://api.github.com
GITHUB_BASE_REF=master
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_aeaacc3e-9324-4b06-a1e2-ef8dea45c41d
GITHUB_EVENT_NAME=pull_request
GITHUB_EVENT_NAME=pull_request
GITHUB_EVENT_PATH=/home/runner/work/_temp/_github_workflow/event.json
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
GITHUB_HEAD_REF=nul-location
GITHUB_JOB=pr
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_aeaacc3e-9324-4b06-a1e2-ef8dea45c41d
GITHUB_REF=refs/pull/117431/merge
GITHUB_REF_NAME=117431/merge
GITHUB_REF_PROTECTED=false
---
GITHUB_SERVER_URL=https://github.com
GITHUB_SHA=0abc97d5373a72cdb1412378708c765aaf698bff
GITHUB_STATE=/home/runner/work/_temp/_runner_file_commands/save_state_aeaacc3e-9324-4b06-a1e2-ef8dea45c41d
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_aeaacc3e-9324-4b06-a1e2-ef8dea45c41d
GITHUB_TRIGGERING_ACTOR=rust-cloud-vms[bot]
GITHUB_WORKFLOW_REF=rust-lang/rust/.github/workflows/ci.yml@refs/pull/117431/merge
GITHUB_WORKFLOW_SHA=0abc97d5373a72cdb1412378708c765aaf698bff
GITHUB_WORKSPACE=/home/runner/work/rust/rust
GOROOT_1_19_X64=/opt/hostedtoolcache/go/1.19.13/x64
---
---- [codegen-units] tests/codegen-units/item-collection/implicit-panic-call.rs stdout ----

error: compilation failed!
status: exit status: 101
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/codegen-units/item-collection/implicit-panic-call.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "-Z" "human_readable_cgu_names" "-O" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-units/item-collection/implicit-panic-call" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-units/item-collection/implicit-panic-call/auxiliary" "-Zprint-mono-items=lazy"
Build completed unsuccessfully in 0:12:53
Build completed unsuccessfully in 0:12:53
MONO_ITEM fn <i32 as Div>::div @@ implicit_panic_call.e56438d38d90c16f-cgu.0[External]
MONO_ITEM fn foo @@ implicit_panic_call.e56438d38d90c16f-cgu.0[External]
MONO_ITEM fn panic @@ implicit_panic_call.e56438d38d90c16f-cgu.0[Internal]
--- stderr -------------------------------
--- stderr -------------------------------
##[error]error: internal compiler error: compiler/rustc_const_eval/src/interpret/place.rs:701:21: write_immediate_to_mplace: invalid Scalar layout: TyAndLayout {
                                    ty: &str,
                                    layout: Layout {
                                        size: Size(16 bytes),
                                        align: AbiAndPrefAlign {
                                            abi: Align(8 bytes),
                                            pref: Align(8 bytes),
                                        abi: ScalarPair(
                                            Initialized {
                                                value: Pointer(
                                                    AddressSpace(
---
                                                0,
                                                1,
                                            ],
                                        },
                                        largest_niche: Some(
                                            Niche {
                                                offset: Size(0 bytes),
                                                value: Pointer(
                                                        0,
                                                    ),
                                                ),
                                                valid_range: 1..=18446744073709551615,
                                                valid_range: 1..=18446744073709551615,
                                            },
                                        ),
                                        variants: Single {
                                            index: 0,
                                        },
                                        max_repr_align: None,
                                        unadjusted_abi_align: Align(8 bytes),
                                }

thread 'rustc' panicked at /checkout/compiler/rustc_errors/src/lib.rs:1000:33:
Box<dyn Any>
Box<dyn Any>
stack backtrace:
   0:     0x7fe7952f765c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h862fdb600c26e0f3
   1:     0x7fe795361a0d - core::fmt::write::hc2b2cfd7e08bd08c
   2:     0x7fe7952ec1c5 - std::io::Write::write_fmt::h83dde47749ec6a15
   3:     0x7fe7952f7445 - std::sys_common::backtrace::print::hdcedd0342354538f
   4:     0x7fe7952fa52a - std::panicking::default_hook::{{closure}}::hdcafe1ea5eeb1f03
   5:     0x7fe7952fa234 - std::panicking::default_hook::hbcd05ca9a838d7b6
   6:     0x7fe795f17583 - <alloc[755396c631c13435]::boxed::Box<rustc_driver_impl[b8fa8fe2f5293580]::install_ice_hook::{closure#0}> as core[511e713565cfc98c]::ops::function::Fn<(&dyn for<'a, 'b> core[511e713565cfc98c]::ops::function::Fn<(&'a core[511e713565cfc98c]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[511e713565cfc98c]::marker::Sync + core[511e713565cfc98c]::marker::Send, &core[511e713565cfc98c]::panic::panic_info::PanicInfo)>>::call
   7:     0x7fe7952fac25 - std::panicking::rust_panic_with_hook::h54227dd9b92df52b
   8:     0x7fe796dbdc56 - std[4a28869af722ff04]::panicking::begin_panic::<rustc_errors[448f416c5a064a01]::ExplicitBug>::{closure#0}
   9:     0x7fe796dbc4d6 - std[4a28869af722ff04]::sys_common::backtrace::__rust_end_short_backtrace::<std[4a28869af722ff04]::panicking::begin_panic<rustc_errors[448f416c5a064a01]::ExplicitBug>::{closure#0}, !>
  10:     0x7fe795bfe0c6 - std[4a28869af722ff04]::panicking::begin_panic::<rustc_errors[448f416c5a064a01]::ExplicitBug>
  11:     0x7fe796d659b4 - <rustc_errors[448f416c5a064a01]::HandlerInner>::span_bug::<rustc_span[56196b0d7678e298]::span_encoding::Span, alloc[755396c631c13435]::string::String>
  12:     0x7fe796d65770 - <rustc_errors[448f416c5a064a01]::Handler>::span_bug::<rustc_span[56196b0d7678e298]::span_encoding::Span, alloc[755396c631c13435]::string::String>
  14:     0x7fe796cd528c - rustc_middle[9e67f4c04a8e010d]::ty::context::tls::with_opt::<rustc_middle[9e67f4c04a8e010d]::util::bug::opt_span_bug_fmt<rustc_span[56196b0d7678e298]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  14:     0x7fe796cd528c - rustc_middle[9e67f4c04a8e010d]::ty::context::tls::with_opt::<rustc_middle[9e67f4c04a8e010d]::util::bug::opt_span_bug_fmt<rustc_span[56196b0d7678e298]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  15:     0x7fe796cd1fe4 - rustc_middle[9e67f4c04a8e010d]::ty::context::tls::with_context_opt::<rustc_middle[9e67f4c04a8e010d]::ty::context::tls::with_opt<rustc_middle[9e67f4c04a8e010d]::util::bug::opt_span_bug_fmt<rustc_span[56196b0d7678e298]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  16:     0x7fe795bfdd37 - rustc_middle[9e67f4c04a8e010d]::util::bug::span_bug_fmt::<rustc_span[56196b0d7678e298]::span_encoding::Span>
  17:     0x7fe796c8ab4e - <rustc_const_eval[5c747e66eb378bb9]::interpret::eval_context::InterpCx<rustc_const_eval[5c747e66eb378bb9]::const_eval::machine::CompileTimeInterpreter>>::write_immediate_to_mplace_no_validate
  18:     0x7fe796c8a532 - <rustc_const_eval[5c747e66eb378bb9]::interpret::eval_context::InterpCx<rustc_const_eval[5c747e66eb378bb9]::const_eval::machine::CompileTimeInterpreter>>::write_immediate_no_validate::<rustc_const_eval[5c747e66eb378bb9]::interpret::place::MPlaceTy>
  19:     0x7fe796cea291 - rustc_const_eval[5c747e66eb378bb9]::util::caller_location::const_caller_location_provider
  20:     0x7fe7978002c9 - rustc_query_impl[c4733f723feec4e5]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[c4733f723feec4e5]::query_impl::const_caller_location::dynamic_query::{closure#2}::{closure#0}, rustc_middle[9e67f4c04a8e010d]::query::erase::Erased<[u8; 24usize]>>
  21:     0x7fe7978e3cc3 - <rustc_query_impl[c4733f723feec4e5]::query_impl::const_caller_location::dynamic_query::{closure#2} as core[511e713565cfc98c]::ops::function::FnOnce<(rustc_middle[9e67f4c04a8e010d]::ty::context::TyCtxt, (rustc_span[56196b0d7678e298]::symbol::Symbol, u32, u32))>>::call_once
  22:     0x7fe797b0bf15 - rustc_query_system[491ba758a15bbd60]::query::plumbing::try_execute_query::<rustc_query_impl[c4733f723feec4e5]::DynamicConfig<rustc_query_system[491ba758a15bbd60]::query::caches::DefaultCache<(rustc_span[56196b0d7678e298]::symbol::Symbol, u32, u32), rustc_middle[9e67f4c04a8e010d]::query::erase::Erased<[u8; 24usize]>>, false, false, false>, rustc_query_impl[c4733f723feec4e5]::plumbing::QueryCtxt, false>
  23:     0x7fe7978f14a2 - rustc_query_impl[c4733f723feec4e5]::query_impl::const_caller_location::get_query_non_incr::__rust_end_short_backtrace
  24:     0x7fe7988f8852 - <rustc_middle[9e67f4c04a8e010d]::ty::context::TyCtxt>::span_as_caller_location
  25:     0x7fe796222fac - <rustc_middle[9e67f4c04a8e010d]::mir::Body>::caller_location_span::<rustc_codegen_ssa[3948ec9de3296f60]::mir::operand::OperandRef<&rustc_codegen_llvm[33a25d7a161f12b2]::llvm_::ffi::Value>, <rustc_codegen_ssa[3948ec9de3296f60]::mir::FunctionCx<rustc_codegen_llvm[33a25d7a161f12b2]::builder::Builder>>::get_caller_location::{closure#0}>
  26:     0x7fe7961bc624 - <rustc_codegen_ssa[3948ec9de3296f60]::mir::FunctionCx<rustc_codegen_llvm[33a25d7a161f12b2]::builder::Builder>>::codegen_terminator
  27:     0x7fe7961ab797 - rustc_codegen_ssa[3948ec9de3296f60]::mir::codegen_mir::<rustc_codegen_llvm[33a25d7a161f12b2]::builder::Builder>
  28:     0x7fe7961cbf0c - rustc_codegen_ssa[3948ec9de3296f60]::base::codegen_instance::<rustc_codegen_llvm[33a25d7a161f12b2]::builder::Builder>
  29:     0x7fe7962988cf - <rustc_middle[9e67f4c04a8e010d]::mir::mono::MonoItem as rustc_codegen_ssa[3948ec9de3296f60]::mono_item::MonoItemExt>::define::<rustc_codegen_llvm[33a25d7a161f12b2]::builder::Builder>
  30:     0x7fe7962210fb - rustc_codegen_llvm[33a25d7a161f12b2]::base::compile_codegen_unit::module_codegen
  31:     0x7fe79622002a - rustc_codegen_llvm[33a25d7a161f12b2]::base::compile_codegen_unit
  32:     0x7fe7961cb456 - rustc_codegen_ssa[3948ec9de3296f60]::base::codegen_crate::<rustc_codegen_llvm[33a25d7a161f12b2]::LlvmCodegenBackend>
  33:     0x7fe79628f066 - <rustc_codegen_llvm[33a25d7a161f12b2]::LlvmCodegenBackend as rustc_codegen_ssa[3948ec9de3296f60]::traits::backend::CodegenBackend>::codegen_crate
  34:     0x7fe7960a0adf - <rustc_session[62d4bb5ba3c62922]::session::Session>::time::<alloc[755396c631c13435]::boxed::Box<dyn core[511e713565cfc98c]::any::Any>, rustc_interface[a1434bf08727a2b8]::passes::start_codegen::{closure#0}>
  35:     0x7fe79606db9d - rustc_interface[a1434bf08727a2b8]::passes::start_codegen
  36:     0x7fe7960e7bcb - <rustc_middle[9e67f4c04a8e010d]::ty::context::GlobalCtxt>::enter::<<rustc_interface[a1434bf08727a2b8]::queries::Queries>::ongoing_codegen::{closure#0}, core[511e713565cfc98c]::result::Result<alloc[755396c631c13435]::boxed::Box<dyn core[511e713565cfc98c]::any::Any>, rustc_span[56196b0d7678e298]::ErrorGuaranteed>>
  37:     0x7fe7960b6816 - <rustc_interface[a1434bf08727a2b8]::queries::Queries>::ongoing_codegen
  38:     0x7fe795f439ce - std[4a28869af722ff04]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[a1434bf08727a2b8]::util::run_in_thread_with_globals<rustc_interface[a1434bf08727a2b8]::interface::run_compiler<core[511e713565cfc98c]::result::Result<(), rustc_span[56196b0d7678e298]::ErrorGuaranteed>, rustc_driver_impl[b8fa8fe2f5293580]::run_compiler::{closure#1}>::{closure#0}, core[511e713565cfc98c]::result::Result<(), rustc_span[56196b0d7678e298]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[511e713565cfc98c]::result::Result<(), rustc_span[56196b0d7678e298]::ErrorGuaranteed>>
  39:     0x7fe795f2336e - std[4a28869af722ff04]::panicking::try::<core[511e713565cfc98c]::result::Result<(), rustc_span[56196b0d7678e298]::ErrorGuaranteed>, core[511e713565cfc98c]::panic::unwind_safe::AssertUnwindSafe<<std[4a28869af722ff04]::thread::Builder>::spawn_unchecked_<rustc_interface[a1434bf08727a2b8]::util::run_in_thread_with_globals<rustc_interface[a1434bf08727a2b8]::interface::run_compiler<core[511e713565cfc98c]::result::Result<(), rustc_span[56196b0d7678e298]::ErrorGuaranteed>, rustc_driver_impl[b8fa8fe2f5293580]::run_compiler::{closure#1}>::{closure#0}, core[511e713565cfc98c]::result::Result<(), rustc_span[56196b0d7678e298]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[511e713565cfc98c]::result::Result<(), rustc_span[56196b0d7678e298]::ErrorGuaranteed>>::{closure#1}::{closure#0}>>
  40:     0x7fe795f147c0 - <<std[4a28869af722ff04]::thread::Builder>::spawn_unchecked_<rustc_interface[a1434bf08727a2b8]::util::run_in_thread_with_globals<rustc_interface[a1434bf08727a2b8]::interface::run_compiler<core[511e713565cfc98c]::result::Result<(), rustc_span[56196b0d7678e298]::ErrorGuaranteed>, rustc_driver_impl[b8fa8fe2f5293580]::run_compiler::{closure#1}>::{closure#0}, core[511e713565cfc98c]::result::Result<(), rustc_span[56196b0d7678e298]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[511e713565cfc98c]::result::Result<(), rustc_span[56196b0d7678e298]::ErrorGuaranteed>>::{closure#1} as core[511e713565cfc98c]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  42:     0x7fe7950bcac3 - <unknown>
  43:     0x7fe79514ea40 - <unknown>
  44:                0x0 - <unknown>


note: using internal features is not supported and expected to cause internal compiler errors when used incorrectly

note: rustc 1.75.0-nightly (0abc97d53 2023-10-31) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z threads=1 -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ignore-directory-in-diagnostics-source-blocks=/cargo -Z human_readable_cgu_names -C prefer-dynamic -C rpath -C debuginfo=0 -Z print-mono-items=lazy
query stack during panic:
query stack during panic:
#0 [const_caller_location] getting a &core::panic::Location referring to a span
error: aborting due to previous error
------------------------------------------


#[stable(feature = "panic_hooks", since = "1.10.0")]
#[cfg(not(bootstrap))]
pub struct Location<'a> {
file: *const (),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs an explicit Send/Sync impl now to keep the same API.

unsafe {
let cstr = CStr::from_ptr(self.file as _);
let len = cstr.count_bytes();
crate::str::from_utf8_unchecked(crate::slice::from_raw_parts(self.file as _, len))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes calls here and to related (Hash, Debug, PartialEq, etc.) functions much more expensive. I guess we may not be able to do much better... but I think the binary size vs. possibly slower binaries that are keeping these locations around (e.g., HashMap) isn't as obvious.

It's possible we could make this near equivalent by avoiding the upfront 0-byte search internally.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another option would be doing a varint length prefix instead of a nul terminator. For short paths it would only be 1 byte so the same size as a nul terminator.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these ever on the hot path?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logging, maybe?

@Noratrieb
Copy link
Member Author

there are quite some improvements that can be done, but let's perf this first
@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Oct 31, 2023

⌛ Trying commit fc2f71f with merge c5474df...

bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 31, 2023
Null terminate `core::panic::Location` file strings

This shrinks `Location` by a usize, making it 24->16 bytes on x86-64. This reduces binary size. I quickly measure `cargo install ripgrep`, which was reduced by 0.3%. That's not a lot, but it's something and the code change is quite simple. From some quick measurements, I expect librustc_driver to shrink by more, but rustc-perf should give us more numbers.

The change to const interning is necessary, see https://rust-lang.zulipchat.com/#narrow/stream/146212-t-compiler.2Fconst-eval/topic/unsupported.20untyped.20pointer.20in.20constant.20error/near/399446285
@bors
Copy link
Contributor

bors commented Oct 31, 2023

☀️ Try build successful - checks-actions
Build commit: c5474df (c5474dfad0ec2dfaa653470360d9382f3f6e742c)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (c5474df): comparison URL.

Overall result: ✅ improvements - 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)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.5% [-0.6%, -0.3%] 4
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)
0.0% [0.0%, 0.0%] 1
Regressions ❌
(secondary)
1.8% [1.8%, 1.8%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.2% [-3.6%, -1.0%] 3
All ❌✅ (primary) 0.0% [0.0%, 0.0%] 1

Cycles

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

Binary size

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.0% [0.0%, 0.0%] 15
Regressions ❌
(secondary)
0.1% [0.0%, 0.1%] 12
Improvements ✅
(primary)
-0.0% [-0.1%, -0.0%] 28
Improvements ✅
(secondary)
-0.6% [-1.3%, -0.1%] 3
All ❌✅ (primary) -0.0% [-0.1%, 0.0%] 43

Bootstrap: 636.003s -> 634.282s (-0.27%)
Artifact size: 304.48 MiB -> 304.42 MiB (-0.02%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 31, 2023
@cuviper
Copy link
Member

cuviper commented Dec 5, 2023

there are quite some improvements that can be done,

Are you intending to do more here?

@Noratrieb
Copy link
Member Author

Given that this improvement here doesn't seem to really help, probably not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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. 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.