Stream: git-wasmtime

Topic: wasmtime / issue #13075 Prefetch instruction for Cranelift


view this post on Zulip Wasmtime GitHub notifications bot (Apr 13 2026 at 19:15):

tareksander opened issue #13075:

Feature

Modern x86 and arm processors support prefetch instructions to ensure memory that's needed in the near future is in the cache.

Benefit

Improved performance for appropriately placed prefetches of needed memory.

Implementation

Since prefetches are nonsemantic, it should be relatively easy to implement. It may need some consideration in regards to spectre and the like though (which I don't know much about) and instruction reordering (to make sure the prefetch stays approximately the same "distance" to the actual load as in the ir).

Alternatives

Calling an external function that contains just the prefetch, which would incur overhead from the call.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 13 2026 at 20:25):

alexcrichton added the cranelift:area:clif label to Issue #13075.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 13 2026 at 20:25):

alexcrichton added the cranelift label to Issue #13075.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 14 2026 at 04:18):

cfallin commented on issue #13075:

This is a reasonable thing that I think we'd be happy to accept a PR for, if you're interested @tareksander.


Last updated: May 03 2026 at 22:13 UTC