Performance Bottlenecks and Thread Support for NumPy in the Browser
Problem
When using NumPy in the browser, users encounter performance bottlenecks, particularly the lack of multi‑threading (pthreads) support that limits GEMM and other compute‑intensive tasks, and the need for extra COOP/COEP headers on static hosting platforms like GitHub Pages to use SharedArrayBuffer. Moreover, reliance on BLAS means performance gains often require waiting for a full NumPy release rather than immediate updates.
Pain points
- Lack of multi‑threading (pthreads) support limits performance of GEMM and similar computations
- Static hosting environments (e.g., GitHub Pages) require extra COOP/COEP headers to use SharedArrayBuffer
- Dependency on BLAS makes performance improvements require a full NumPy release rather than immediate updates
Questions to verify
- Does using SharedArrayBuffer on static hosting platforms (e.g., GitHub Pages) suffer from COOP/COEP header restrictions?
- Is multi‑threading (pthreads) support considered critical for improving NumPy's compute performance in the browser?
Evidence
quote · @Anonymous
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.
quote · @Anonymous
Wouldn't AI rewrite of these legacy Fortran packages like BLAS be easier at this point than trying to keep Fortran alive?
Disclaimer: this card is distilled by AI from community discussions as “pain point evidence”. It is a starting point for need analysis and validation, not a “validated market need”. AI has analytical limits; please open the original discussion above to manually verify before key decisions.