I recently experimented with this [0] - there is some overhead but it's acceptable. I noticed that the more arguments you pass over into a Wasm function, the slower things get (see .set test).
Note: I'm either bad at doing correct benchmarks or the Javascript compiler is pretty sneaky at optimizing things.