Repository navigation
Conversation
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
`Clause::kind` use `unreachable_unchecked`
| // SAFETY: This function is incredibly hot. Let's make it optimize better. | ||
| _ => unsafe { std::hint::unreachable_unchecked() }, |
There was a problem hiding this comment.
I don't understand safety comments apparently. This is not a safety comment
There was a problem hiding this comment.
// HOTNESS: This function is incredibly hot.
There was a problem hiding this comment.
Now the big problem, is that it's non-trivial to actually make this safe. THis field is public and the best commit is "while pub(super), nobody constructs a clause from something that's not a PredicateKind::Clause"
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (b7e7c71): 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 @bors rollup=never rustc-perf Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 2.0%, secondary 2.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 1.9%, secondary -5.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 490.969s -> 489.986s (-0.20%) |
|
don't have the capacity to properly make sure this is safe https://rust-lang.zulipchat.com/#narrow/channel/247081-t-compiler.2Fperformance/topic/needs.20help.3A.20small.20perf.20improvement.20with.20non-local.20reasoning/with/628660586 closing this PR |
outline unreachable! from Clause::kind Safe alternative to #163639. `unreachable!()` expands to `panic("internal error: entered unreachable code")`, which we've seen before to be worse than plain argument-less call in other hot places. see https://rust-lang.zulipchat.com/#narrow/channel/247081-t-compiler.2Fperformance/topic/needs.20help.3A.20small.20perf.20improvement.20with.20non-local.20reasoning/with/628660586
it's very hot. Let's see if it positively impacts perf
r? ghost