LoginSignup
38
38

More than 5 years have passed since last update.

numpy, scipyちょっと遅い気がするって時はblas, lapack, atlasが入っているか見直しましょう

Last updated at Posted at 2014-08-22

僕の場合はatlasのみ抜けていて、atlas入れてからビルドし直したらめっちゃ速くなった

確認方法

import numpy
import scipy

numpy.__version__ # 1.9.3
numpy.show_config() # blas, lapack, atlasと一緒にビルドされているか確認できる

scipy.__version__ # 0.16.0
scipy.show_config() # numpyの場合と同様

どのくらい速くなるのか

以下のGaP-NMFのpython版ベンチマーク(マニアックですが)で、1.75倍速くなった。コメント参照
GaP-NMF short benchmark scripts for Python and Julia.

Juliaの方が遅くなって僕は涙目です

ATLASのインストール

ubuntuの場合は

sudo apt-get install libatlas-base-dev

とすればおk

38
38
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
38
38