Hi all! I would like to start thinking and brainstorming the design of an incremental compilation cache in Cranelift/Wasmtime. The idea being that if a wasm function has already been compiled once in a wasm module, and it hasn't changed when trying to recompile it later, then we could reuse the compiled function's artifact. That would be beneficial in the following cases:
I'd like to discuss this topic in real-time to brainstorm about it, and mentioned that during today's Wasmtime call. @Chris Fallin expressed interest in being part of the conversation, and anyone interested is of course welcome. First probes into peoples' agendas indicate this could be a topic for the first Wasmtime or Cranelift meeting taking place in April.
Will add this topic to the Cranelift meeting happening April 4th, and we can discuss it then!
Thanks Ben for organizing this!
Would this only apply to wasmtime or also to any cranelift user (eg cg_clif)?
@bjorn3 I suspect that most of the changes will be wasmtime-specific, as Cranelift is already function-centric. In a sense one could do this already by caching/memoizing the CLIF-to-machine-code translation; the more interesting bits are making Wasmtime generate CLIF that is somewhat invariant to perturbations in the input (e.g. add a new function that shifts all indices by one, or add a slot to the VMContext), maybe by more indirection. Certainly whatever techniques we come up with could be used by other CL frontends as well though!
Last updated: Nov 22 2024 at 16:03 UTC