5 ms·
wasm has SIMD extension https://github.com/WebAssembly/simd/blob/master/proposals/simd/SIMD.md https://github.com/WebAssembly/simd/blob/master/proposals/si... .
by hsfzxjy 2y ago
wasm has SIMD extension https://github.com/WebAssembly/simd/blob/master/proposals/simd/SIMD.md https://github.com/WebAssembly/simd/blob/master/proposals/si... . You can use them even in browsers (e.g. Chrome >= 91)
- jsheard 2y agoOP is asking how SIMD is beneficial to this specific application. If there's a small neural network involved then evaluating that is probably a good place to use SIMD.
- hsfzxjy 2y agoYes. The program actually includes an ONNX runtime, which uses SIMD to accelerate NN inference.
- jcelerier 2y agobut... the program ends up entirely compiled and executed as TTF bytecode in the end right, since it's entirely contained in the TTF font ? And TTF bytecode is only the following instructions : https://developer.apple.com/fonts/TrueType-Reference-Manual/RM05/Chap5.html https://developer.apple.com/fonts/TrueType-Reference-Manual/... and I don't see anything related to SIMD in there
- erk__ 2y agoNo that is not what is happening, HarfBuzz have a experimental Wasm shaper, so the font embeds some wasm code that tells Harfbuzz what to output. https://github.com/harfbuzz/harfbuzz/blob/main/docs/wasm-shaper.md https://github.com/harfbuzz/harfbuzz/blob/main/docs/wasm-sha...
- jcelerier 2y agooh ok, so it can't work in any system that doesn't use harfbuzz.. that's much less interesting than what I originally thought