NEON
or SSE*
?
#20748
-
There's an existing code base with both arm_neon & x86 sse4.1 support, specified by conditional compiling. As for web distribution, need I compile the codes into different binaries like Or is it better to port existing code using Wasm intrinsics so as to leverage performance? Or should I simply activate relaxed simd |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
If there is no way to build an x86 or arm specific wasm file. The neon and x86 sse support we have in emscripten basically attempts to emulate those standards on top of wasm simd intrinsics. Depending on what type of operations you are doing I imagine it could be possible for either the x86 emulation or the arm emulation to be faster, but for best performance you would likely want to use specific wasm simd. |
Beta Was this translation helpful? Give feedback.
There would never be any reason to deliver separate x86 and arm binaries, no. In fact it would (almost) impossible for you to detect which binary to download even if you wanted to do that.
When building the with x86 or arm intrinsics the they both get lowers to Wasm intrinsics so there is no longer any bias to towards one or the other in the final wasm file.