Hacker news

  • Top
  • New
  • Past
  • Ask
  • Show
  • Jobs

Faster NumPy in the Browser (https://notebook.link)

49 points by Matumio 5 days ago | 8 comments | View on ycombinator

bern4444 about 21 hours ago |

There is also numpy-ts[1] which is measured to be faster than numpy proper if you want to skip the webassembly.

[1] https://numpyts.dev/latest/performance/overview

miohtama 1 day ago |

Wouldn't AI rewrite of these legacy Fortran packages like BLAS be easier at this point than trying to keep Fortran alive?

sharktheone 1 day ago |

Very cool too see. So happy we actually have SIMD in WASM

wangxiaoxiang55 1 day ago |

The dynamic-linking detail is the part I find most interesting. On PyPI, NumPy wheels vendor a BLAS snapshot, so a BLAS improvement means waiting for the next NumPy release. Here OpenBLAS is its own conda package, so a JupyterLite / notebook.link environment picks up 0.3.35 by adding a channel and nothing else changes. That's a real payoff of treating wasm32 as a conda platform instead of a wheel target.

Question for the authors: Appendix F puts 0.3.35 at roughly 0.4-0.5x of single-thread linux-64 on GEMM. How much of the remaining gap do you attribute to wasm codegen vs. the missing threads? And is a pthreads build on the roadmap at all? A lot of JupyterLite deployments are static hosting (GitHub Pages and the like) where you can't set the COOP/COEP headers SharedArrayBuffer needs, so I'd guess single-thread stays the default for a long time regardless.