wasm-bindgen icon indicating copy to clipboard operation
wasm-bindgen copied to clipboard

JsValue performance

Open caperaven opened this issue 2 years ago • 0 comments

The documentation for JsValue contains this text.

"A JsValue doesn't actually live in Rust right now but actually in a table owned by the wasm-bindgen generated JS glue code. Eventually the ownership will transfer into wasm directly and this will likely become more efficient, but for now it may be slightly slow."

How much of a hit does one take on this, does anyone know? As for the ownership part of the statement, is that a web assembly thing or a rust thing?

Lastly, for performance critical items, is there a workaround to boost performance when working with objects that live in Javascript but get operated on in Rust?

caperaven avatar Aug 20 '22 22:08 caperaven