Stream: git-wasmtime

Topic: wasmtime / issue #9514 Is aot mode rellay faster than jit...


view this post on Zulip Wasmtime GitHub notifications bot (Oct 28 2024 at 12:26):

giteewif opened issue #9514:

Aot mode use the api deserialize, it get module from serialized module that called from Module::from_file() or Module::from_bytes(),and serilize api. And I test the aot mode and jit mode in polybench wasm or libsodium bench,their performance is same in execution, otherwise the compilation.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 28 2024 at 12:26):

giteewif edited issue #9514:

Aot mode use the api deserialize, it get module from serialized module that called from Module::from_file() or Module::from_bytes(),and serilize api. And I test the aot mode and jit mode in polybench wasm or libsodium bench,their performance is same in execution, otherwise the compilation.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 28 2024 at 15:01):

alexcrichton closed issue #9514:

Aot mode use the api deserialize, it get module from serialized module that called from Module::from_file() or Module::from_bytes(),and serilize api. And I test the aot mode and jit mode in polybench wasm or libsodium bench,their performance is same in execution, otherwise the compilation.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 28 2024 at 15:01):

alexcrichton commented on issue #9514:

You're evaluation matches expectations which is that these two perform the same. The "JIT mode" compile process is the exact same as "AOT mode" and so the exact same artifact is produced in both situations. That means the only expected difference is compile time.

Out of curiosity did you locate documentation that indicate the contrary? Did we for example have outdated documentation indicating that one mode was faster than the other?

view this post on Zulip Wasmtime GitHub notifications bot (Oct 28 2024 at 15:21):

giteewif commented on issue #9514:

Thanks! There is no doc that show that, i just thought aot should perform best. That means wasmtime only support jit mod? the aot mode just the aot style, it do not compile all the code before execution?

view this post on Zulip Wasmtime GitHub notifications bot (Oct 28 2024 at 15:25):

alexcrichton commented on issue #9514:

Wasmtime doesn't have a first-class concept of "jit mode" or "aot mode" actually, so it's more in how you use Wasmtime than anything else. Once a module is running Wasmtime never generates code, so the two modes behave exactly the same way after a Module is created.

Put another way you can think of "jit mode" as "I can create a Module from a wasm blob" and "aot mode" is "I can create a Module from some previously-serialized bytes". In both cases the operation that's being done is the creation of a Module. In both cases once a Module is created (or wasmtime_module_t in the C API) no more codegen happens so both perform the same way.


Last updated: Nov 22 2024 at 17:03 UTC