-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Looks interesting #1
Comments
Hey Bruno! |
Cool. Have you tried emscritpem with webassembly for nodejs? https://dev.to/azure/experimenting-with-web-assembly-and-nodejs-40f4 |
Actually, there seems to be a port already: https://github.com/likr/emlapack |
By using webassembly instead of directly bind to native libs you'd get the benefit of making your library work on browsers too... |
Great! Thanks for the advice. Now i'm gonna to take a look to web assembly. |
But also emlapack seem to be a valide alternative. |
So I decided to try something: https://github.com/brunobasto/quick-matrix From my experiments, doing calculations with WASM is really faster than plain JavaScript or even GPU.js. Actually, I'm finding GPU.js to be really slow. Maybe I'm doing something wrong or my graphics card is just not good. I even tried to memoize the kernels so that the overhead of compiling it would not be a problem but it still seems to be slower than just plain JavaScript.. |
I've also tried WASM in the last couple of days, and I found it really fast! I think that's the way to go to build the low level API. And yes, Gpu.js is slow that plain javascript when dealing with small matrices. I've found it faster when the matrices are bigger than 1024 x 1024. |
Hey Bruno, |
I'm following a coursera course about machine learning and was about to write my own library for doing efficient matrix operations in javascript until I found this. Nice work.
One question (I haven't browsed the source code much): In what operations are you leveraging gpu.js? Is it only matrix multiplication for now?
The text was updated successfully, but these errors were encountered: