vectorious
vectorious copied to clipboard
SIMD support
Check out https://github.com/Aandreba/llml_simd
That's really good to see. I'm not seeing any indication of API documents for it though, https://www.npmjs.com/package/llml_simd has the same or very similar readme.
@mateogianolio Have you got any further into the details of that code? Have you got any suggestions on how to get it's API from Rust or some kind of easy to use analysis of the Rust code? Or even the JS? I've only looked it it for a few minutes, I could probably get somewhere with a bit of trial and error. I don't know how useful it would actually be from node because there is an overhead when calling C++ and presumably Rust too.
It may turn out to be very useful educationally to look into this code, and see what it offers in terms of calling highly optimised Rust code from JS even if it's not useful as-is because of the overhead of calling compiled code from JS being too high. That overhead could (and should) fall in the future, so it's worth paying attention to and having measurements of.
I think WASM calls still have a non-negligible overhead, and I don't think SIMD is officially supported by WASM yet?
But as far as I can tell neon (https://neon-bindings.com/) should achieve near-native performance (at least same performance as c++ addons). The downside obviously being that it only works in node.js and not the browser.
That said, I have not tried the library so can't say anything about it other than it looked interesting :)