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
Exceptions are slow in Wasm since the stack is unwound in a generic way.
One could experiment with changing the calling convention to return null on exception (storing the exception in a global value). That should not be too much work since it only involves the generated code (and the runtime code to invoke callbacks). The runtime would still throw Wasm exceptions.
Another approach would be to change the calling convention only for functions that may throw an exception and which we know are called from within an exception handler. If the optimized function may escape, we can call it from a wrapper function that will raise a Wasm exception. This will cover many cases like searching in a list or a map while keeping a faster calling convention in most cases.
The text was updated successfully, but these errors were encountered:
Exceptions are slow in Wasm since the stack is unwound in a generic way.
One could experiment with changing the calling convention to return null on exception (storing the exception in a global value). That should not be too much work since it only involves the generated code (and the runtime code to invoke callbacks). The runtime would still throw Wasm exceptions.
Another approach would be to change the calling convention only for functions that may throw an exception and which we know are called from within an exception handler. If the optimized function may escape, we can call it from a wrapper function that will raise a Wasm exception. This will cover many cases like searching in a list or a map while keeping a faster calling convention in most cases.
The text was updated successfully, but these errors were encountered: