5 ms·
> by default code sandboxed by wasm is fully deterministic Sorry? I'm not sure what you mean by "fully deterministic" here, because as far as I was aware you c
by saagarjha 6y ago
> by default code sandboxed by wasm is fully deterministic
Sorry? I'm not sure what you mean by "fully deterministic" here, because as far as I was aware you can do basically anything including choosing to not terminate inside of WASM.
- azakai 6y agoYou can have an infinite loop, sure, but aside from that wasm semantics are precisely defined in a deterministic way (well, except for minor issues with float NaN bits). That is, if a computation terminates, it will always terminate and with the same results. That's the case because wasm itself has no way to tell the time, generate a random number, etc., and each operation's semantics are well-defined. (If infinite loops are a concern, you can do what wasm VMs do on the web which is to show a "stop script?" dialog after too much time passes.)
- monocasa 6y agoWASM is not deterministic from a timing perspective.