You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Internally, Kani uses the `call_with_panic_debug_info()` function to
call closures with a string that explains what they're trying to do,
allowing better error messages if they internally panics. However, this
function is currently called for every harness we codegen and has to
pretty format the harness' function instance--something that calls into
rustc internals and takes a non-negligible amount of time.
We should instead accept a closure that can generate debug info, but
only when (and if) it's needed.
### Results
Based on initial flamegraphing, the formatting passed to
`call_with_panic_debug_info()` went from taking 2.3% of codegen on
`s2n-codec` to not being called a single time (since there are no
compiler errors in a typical execution).
This change made a solid **4.6% reduction in the end to end compile time
of the standard library** (at std commit
[177d0fd](model-checking/verify-rust-std@177d0fd);
assuming #4257, #4259 & #4268 are already merged into Kani).
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.
0 commit comments