Skip to content

Cache wasm module instantiations across macro invocations #16

Closed
@alexcrichton

Description

@alexcrichton

I'm extracting this as an actionable item from #2 where one thing for speed optimization that we'll need to do is to cache the instantiation of a wasm module across macro invocations. This'll shave about 50ms off each macro invocation in the case of using the JIT.

I'm not really sure how best to key this cache though in an efficient manner. We may be able to get by with a simple hash table and comparing sizes of wasm blobs, and then memcmp should be a well optimized rountine located in libstd, even for debug builds, so that may be fast enough to just key off wasm blobs directly. (they're all pretty unlikely to be the same length anyway)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions