WebAssembly / WebAssembly/threads

Spinloop relaxation instruction

Open
#15 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
WebAssembly
Stars
767
Forks
54
PR merge metrics
No merged PRs in 30d

Description

(Forked from issue #11)

One operation that never made it into ES was an instruction to relax in a spinloop (ie, the PAUSE instruction in x86, IIRC). It was in the very earliest drafts of the spec but I think that, more than anything, it was considered very low-level for ES and something that would create controversy. (I experimented with a related idea, a micro-wait primitive with a back-off scheme, and I called that "pause" too, but it's not what I'm talking about here.)

I know that PAUSE is important for performance on x86. I don't know if ARM has anything similar in eg its event instructions (WFE). I don't know if it's a good idea to push this through for the MVP since we won't be able to remove it again if it turns out to be the wrong thing.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the referenced issue #11 and the existing discussion, then compare the requested spinloop relaxation behavior with the cited x86 PAUSE and ARM WFE instructions. Done means the proposal has a recorded decision and a concrete scope, clearly separated from the unrelated micro-wait and back-off idea.

Written by the indexing model from the issue text.

Assessment

Tech stack
wasm
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.