Stream: general

Topic: question: wasmtime execution


view this post on Zulip Samrat Man Singh (Mar 15 2020 at 15:23):

Hi folks, I've been jumping around the wasmtime and cranelift code, mostly for my own education.

Am I correct in understanding that wasmtime always executes a module by JITing the code and then running the JIT-ed code? Does it not follow the LuaJIT model of only generating native code for hot code?

view this post on Zulip bjorn3 (Mar 15 2020 at 15:24):

That is correct. Wasmtime does have a cache for the JIT-ed code, so JITing should take less time after the first invocation.

view this post on Zulip Till Schneidereit (Mar 15 2020 at 19:36):

The plan is to eventually have additional execution modes:

In that last scenario, we'd at least potentially introduce support for per-function tiering, but that'd depend on strong use cases

view this post on Zulip Dan Gohman (Mar 15 2020 at 20:00):

As additional background, Lua doesn't have static types, so it's not possible to generate efficient code for it untl you've run it for a while and gathered data on what types it's using at runtime.

view this post on Zulip Dan Gohman (Mar 15 2020 at 20:01):

WebAssembly has static types, so it's possible to generate good native code for it without having to see it run first.


Last updated: Nov 22 2024 at 16:03 UTC