Intent to prototype: WebAssembly relaxed SIMD

Skip to first unread message

Lars Hansen

Apr 22, 2021, 5:08:45 AM4/22/21
Summary: Adds SIMD instructions with locally nondeterministic semantics to account for different behavior in different instruction sets and sometimes within different members of the same CPU family.  Local nondeterminism can take the form of different approximations, differing NaN behavior, differing rounding behavior, and differing response to some subset of inputs, to mention only some.


Platform coverage:  x86, x64, arm64 (same as Wasm SIMD).

Preference: javascript.options.wasm_relaxed_simd

DevTools bug: No bug, I don't believe any work is required here.

Other browsers: Google is championing the proposal but has not signaled anything publicly at this time.  We expect them to strongly back this proposal.

web-platform-tests:  Tests will be imported + we will have internal tests, as for SIMD.


Martin Thomson

Apr 22, 2021, 5:44:18 AM4/22/21
to Lars Hansen,
So this nondeterministic behaviour turns out to be a really great source of fingerprinting data in web audio. Because it is deterministic, for the same CPU. What, if anything, is being done here to manage that risk for this API?

Brave had some tricks for web audio (that don't appear effective in practice), but I can't see those working in this case.

You received this message because you are subscribed to the Google Groups "" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Lars Hansen

Apr 22, 2021, 6:04:11 AM4/22/21
to Martin Thomson,
Fingerprinting is something the group is concerned about.  The issue becomes whether you can discover something that you couldn't (easily) discover already.  It is my understanding that it's already possible to distinguish between, say, Intel and ARM64 by inspecting the specific payload or sign bits computed for certain NaNs.  And with Wasm SIMD, it is already possible to distinguish between "older" Intel chips and newer ones because SIMD is only supported on the newer ones.  (In Firefox, we don't even support SIMD at all on 32-bit ARM, so there's a bit.)  On some families of chips, the performance of some instructions is so awful that it's likely possible to sniff those chips using differential performance.  64-bit systems can easily be distinguished from 32-bit.  And so on.  Obviously we don't want to make it worse than it is but this space is already fairly effectively explorable from JS and wasm.

My take on this is that for each of the instructions proposed we'll need to analyze it for how much it improves fingerprinting in practice / how valuable that bit of fingerprinting information can be.  We are discussing the possibility of / need for external review for fingerprintability.  It's early days still, and for serious numerical computation some of these instructions are likely crucial, but fingerprinting concerns are very high on the agenda.

Reply all
Reply to author
0 new messages