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
A-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsI-slowIssue: Problems and improvements with respect to performance of generated code.
The runtime has several performance-sensitive code paths that are compromising between going fast and making important assertions.
Right now the runtime knows about RUST_DEBUG and RUST_NDEBUG macros. When RUST_DEBUG is defined we do assertions about lock ownership and not much else. RUST_NDEBUG is defined by default, not RUST_DEBUG.
Let's make greater use of this by disabling expensive assertions and enabling optimizations. Because this involves disabling a lot of very checks we'll have RUST_DEBUG on by default.
Without RUST_DEBUG we can
Run the box annihilator on normal task exit without worrying about obscuring cycle collector errors
Turn off valgrind hints on stack allocation and switching paths that have real overhead
Turn off check_stack_canary
Turn off other expensive asserts
By default (with RUST_DEBUG) you get
More locking assertions
More calls to check_stack_canary
More expensive asserts on the stack switching fast paths
Most likely this will involve changing the configure script too. Instead of --enable-debug we would have --disable-debug. Since this should end up with a noticeable performance difference between the two, configure and/or make all and make check might want to mention it, perhaps even in a handsome ascii-art box.
Notes
Make sure to measure each to make sure it's worth doing
Rewrite the reachability module to use Stable APIs wherever possible.
Note that in StableMIR the instance body is already monomorphized and
constants are already evaluated, which simplifies the code for most of
it, except to handle stubbing issue rust-lang#2589.
For the stubbing issue, we still use a mix of stable and internal APIs
to detect an invalid monomorphization.
Co-authored-by: Adrian Palacios <[email protected]>
Co-authored-by: Zyad Hassan <[email protected]>
A-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsI-slowIssue: Problems and improvements with respect to performance of generated code.
The runtime has several performance-sensitive code paths that are compromising between going fast and making important assertions.
Right now the runtime knows about RUST_DEBUG and RUST_NDEBUG macros. When RUST_DEBUG is defined we do assertions about lock ownership and not much else. RUST_NDEBUG is defined by default, not RUST_DEBUG.
Let's make greater use of this by disabling expensive assertions and enabling optimizations. Because this involves disabling a lot of very checks we'll have RUST_DEBUG on by default.
Without RUST_DEBUG we can
By default (with RUST_DEBUG) you get
Most likely this will involve changing the configure script too. Instead of --enable-debug we would have --disable-debug. Since this should end up with a noticeable performance difference between the two,
configure
and/ormake all
andmake check
might want to mention it, perhaps even in a handsome ascii-art box.The text was updated successfully, but these errors were encountered: