Commit a4f9719
committed
Auto merge of #120863 - saethlin:slice-get-checked, r=the8472
Use intrinsics::debug_assertions in debug_assert_nounwind
This is the first item in rust-lang/rust#120848.
Based on the benchmarking in this PR, it looks like, for the programs in our benchmark suite, enabling all these additional checks does not introduce significant compile-time overhead, with the single exception of `Alignment::new_unchecked`. Therefore, I've added `#[cfg(debug_assertions)]` to that one call site, so that it remains compiled out in the distributed standard library.
The trailing commas in the previous calls to `debug_assert_nounwind!` were causing the macro to expand to `panic_nouwnind_fmt`, which requires more work to set up its arguments, and that overhead alone is measured between this perf run and the next: rust-lang/rust#120863 (comment)File tree
0 file changed
+0
-0
lines changed0 file changed
+0
-0
lines changed
0 commit comments