浏览器中 NumPy 性能瓶颈与线程支持
问题概述
在浏览器中使用 NumPy 时,用户面临性能瓶颈,尤其是缺乏多线程(pthreads)支持导致 GEMM 等计算受限,以及静态托管环境(如 GitHub Pages)需要额外的 COOP/COEP 头部配置才能使用 SharedArrayBuffer。此外,对 BLAS 的依赖使得性能改进需要等待完整的 NumPy 发行版,而非即时更新。
痛点标签
- 缺乏多线程(pthreads)支持导致 GEMM 等计算性能受限
- 静态托管环境(如 GitHub Pages)需要额外的 COOP/COEP 头部配置才能使用 SharedArrayBuffer
- 对 BLAS 的依赖使得性能改进需要等待完整的 NumPy 发行版
待验证问题
- 在静态托管平台(如 GitHub Pages)上使用 SharedArrayBuffer 是否受到 COOP/COEP 头部限制?
- 多线程(pthreads)支持对 NumPy 在浏览器中的计算性能提升是否关键?
证据
原话 · @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.
原话 · @Anonymous
Wouldn't AI rewrite of these legacy Fortran packages like BLAS be easier at this point than trying to keep Fortran alive?
免责声明:本卡片由 AI 从社区讨论中提炼,属于「痛点证据」,是需求分析与验证的起点,不等同于「已验证的市场需求」。AI 存在分析局限,关键决策前请打开上方原始讨论人工复核。