Hi folks! If we compile the same Wasm program twice using the same Wasmtime binary, would you expect the resulting generated code to be the same (modulo the register names and absolute memory addresses).
If not, could you think of potential sources of non-determinism or non-determinisitc optimizations? For example, do some optimization perhaps depend on the time or pointer values?
I would expect the actual compilation to be fully deterministic. Cranelift doesn't read the current time for anything other than reporting compilation times. It is possible that it depends on hashmap iteration order somewhere, but I would consider it a bug if it does.
Thanks @bjorn3 ! That's great to hear.
Last updated: Nov 22 2024 at 17:03 UTC