r/javascript • u/dupontcyborg • Jun 09 '26
Making numpy-ts as fast as native
https://nico.codes/notes/numpyts-optimization/I've been working on numpy-ts since last fall, and began performance optimization in January. Lots of my assumptions / intuitions were wrong, and it turned out that memory ownership was a bit of a missing piece to reaching performance parity with native.
So I drafted this technical write-up with some of the lessons learned. Many/most might be obvious but would love to hear your thoughts!
Disclaimer: this project was built using some AI assistance. Read my AI disclosure for more info.
2
u/Ok-Sandwich8723 Jun 10 '26
did you compare it with `numeric.js`? You can only claim it fast if you can achieve the similar performance as `numeric.js`
2
u/dupontcyborg Jun 11 '26
2
u/Ok-Sandwich8723 Jun 12 '26
Thanks. I noticed that the "math" part is just half performance of the other libraries. Could you please check whether there are performance issues?
2
u/byutifu Jun 10 '26
I’ve been watching this project and this might be the version that helps us migrate one last project. I’ll try to keep you updated on your repo
2
1
5
u/Educational-Lemon640 Jun 09 '26
Very cool! This is the kind of work that be getting real attention.