Vectorious: BLAS-accelerated linear algebra for TypeScript
github.com
github.com
Tried to run a Gaussian mixture model in JS. Topped out at 8 dimensions which it could run in minutes. Any more than that would crash. Python (sklearn) ran 200 dimensions in less than a second.
C++ addons for Node.js are not part of the JavaScript runtime.
This is how a lot of the native node libraries work under the hood to allow parallel IO operations! It’s also an incredibly powerful performance optimisation tool in more complex, scale out NodeJS deployments.
There are nuances to how data enters and exits the VM runtime which means I couldn’t say with confidence if performance would be better or worse in the general case - but either direction is at least technically viable.
I could see it adding some tensor types that drop into zig code that uses webgpu bindings. And add some operator overloading so you could just add t1 + t2 etc.