bytecodealliance / wasmtime

A fast and secure runtime for WebAssembly
https://wasmtime.dev/
Apache License 2.0
14.82k stars 1.23k forks source link

Skip `AutoAssertNoGc` checks for applicable signatures #8807

Closed alexcrichton closed 2 weeks ago

alexcrichton commented 2 weeks ago

This commit skips the safety checks of AutoAssertNoGc for the duration of host calls where the types involved are statically known to not perform any GCs (e.g. integers and floats). This helps recover some performance loss from indirect calls made on entry/exit of an AutoAssertNoGc scope when the gc feature is enabled in Wasmtime.

This is in reference to this discussion