Stream: git-wasmtime

Topic: wasmtime / issue #985 Merge defined and imported impls of...


view this post on Zulip Wasmtime GitHub notifications bot (Jun 24 2021 at 18:38):

alexcrichton commented on issue #985:

Fixed in https://github.com/bytecodealliance/wasmtime/pull/3023

view this post on Zulip Wasmtime GitHub notifications bot (Jun 24 2021 at 18:38):

alexcrichton closed issue #985:

We have two copies of all of our runtime functions that implement memory-related instructions (eg memory.size, memory.grow, memory.init, and memory.copy):

  1. A version for locally defined memories
  2. A version for imported memories

Having two different impls isn't a speed win because the tiny bit of specialization is definitely dwarfed by the cost of an indirect library function call.

We just don't currently have a nice way to get a memory regardless if it is imported or locally defined given a MemoryIndex. That is easy enough to do, we have Instance::get_table that does exactly this for tables rather than memories, and we can do a similar thing for memories.


Last updated: Dec 23 2024 at 12:05 UTC