Running NumPy in the browser now benefits from an accelerated BLAS because Emscripten-forge rebuilt a conda-like WebAssembly ecosystem and enabled a Fortran toolchain (Flang) and OpenBLAS builds that link to NumPy at runtime. That work required Flang patches to target wasm32, OpenBLAS adaptations for Emscripten calling conventions, and packaging so libopenblas is a separate, dynamically linked package. The language-agnostic distribution lets Python, R, and other stacks share the same optimized native libraries, so upgrading OpenBLAS improves the whole ecosystem without rebuilding NumPy. Key contributors include Isabel Paredes and Serge Guelton on Flang, Ian Thomas on OpenBLAS integration, and QuantStack on SIMD kernels.
The performance gains are substantial and specific. With OpenBLAS 0.3.34, 1024×1024 matrix multiply in float32 is about 30.92× faster (and 14.90× for float64) versus the no-BLAS baseline; Level‑3 GEMM shows the largest wins while some LAPACK-backed np.linalg calls see smaller 1.08-1.65× gains. OpenBLAS 0.3.35 adds wasm SIMD microkernels and yields another 1.79× (float32) and 1.41× (float64) improvement over 0.3.34 (e.g., 28→50 GFLOPS and 14.6→20.5 GFLOPS), and an optional Relaxed SIMD build boosts that further (about 1.17× float32 and 1.43× float64 on supported engines). Matrix-vector and vector kernels also improve in 0.3.35; remaining limits stem from LAPACK routines not yet specialized for WebAssembly.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.