Re:Vectorious: BLAS-accelerated linear algebra for TypeScript
by revskill on Saturday June 03, 2023 @03:27AM
(#36174490)
But it still blocks event loop ?
[ Parent
| on HN ]
Re:Vectorious: BLAS-accelerated linear algebra for TypeScript
by byteofbits on Saturday June 03, 2023 @03:49AM
(#36174593)
Native bindings can use libuv to offboard work to other threads and then re trigger the JS execution when it completes.
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.
Re:Vectorious: BLAS-accelerated linear algebra for TypeScript
by revskill on Saturday June 03, 2023 @03:51AM
(#36174600)
So in theory, if we ported python libraries into JS, the performance could be better than Python ?
Re:Vectorious: BLAS-accelerated linear algebra for TypeScript
by byteofbits on Saturday June 03, 2023 @04:02AM
(#36174651)
At work we do some pretty significant parallelised computation (using Node and Rust) and that has equivalent performance to a relevant python based library.
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.
Re:Vectorious: BLAS-accelerated linear algebra for TypeScript
by NickChasanis on Saturday June 03, 2023 @04:21PM
(#36180169)
i was thinking about that, seems like a good deal overall with limited overhead.