pip 安装的 vs conda 安装的
根据 scikit-learn 的描述:
pip 安装的 numpy, scipy 用的是 OpenBLAS。
conda 安装的是 mkl。conda-forge 提供的是 OpenBLAS。
根据 numpy 官方的描述( https://numpy.org/install/ ),conda-forge 里的 numpy 的 BLAS 版本是:
In the conda-forge channel, NumPy is built against a dummy “BLAS” package. When a user installs NumPy from conda-forge, that BLAS package then gets installed together with the actual library - this defaults to OpenBLAS, but it can also be MKL (from the defaults channel), or even BLIS or reference BLAS.
英特尔 vs AMD
英特尔CPU用 mkl 明显比不用 mkl 快,毕竟 mkl 是英特尔自家的产品。
据说 mkl 对 AMD CPU 有负优化,所以 AMD CPU 用 pip 安装的 numpy 比较快。
Windows 环境的另一个选择是到以下网址自行选择加速版本:
https://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy