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.
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.
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.
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?
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?
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
Moduleis created.Put another way you can think of "jit mode" as "I can create a
Modulefrom a wasm blob" and "aot mode" is "I can create aModulefrom some previously-serialized bytes". In both cases the operation that's being done is the creation of aModule. In both cases once aModuleis created (orwasmtime_module_tin the C API) no more codegen happens so both perform the same way.
Last updated: Dec 06 2025 at 06:05 UTC