やってしまったか。
さらなる高速化のため numba とやらを試そうかと思ったのが運のつき。
Macでの情報を検索してみると
llvmのインストールbrew install homebrew/versions/llvm38 export LLVM_CONFIG=/usr/local/Cellar/llvm38/3.8.1/bin/llvm-config-3.8 llvmlite のインストールpip3 install llvmlite numbaのインストールpip3 install numba
ふむ。
$ brew install homebrew/versions/llvm38 : To avoid broken installations, as soon as possible please run: brew upgrade Or, if you're OK with a less reliable fix: brew upgrade python Error: homebrew/versions was deprecated. This tap is now empty as all its formulae were migrated.
!? とりあえず...
$ brew upgrade :
!?
$ python Python 3.6.5 (default, Mar 30 2018, 06:41:49) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>>
Python 3 になっとる。
ここまで Python 2 のままで Python 3 には手を出してなかったのに〜!
まぁ、あきらめます。いい機会と思って Python 3 で動くようにしてみます。
numba は後回し。
v15.patch メモ
$ cat v15.patch | ( cd rt ; patch -p1 ) $ cd rt $ ./cg.py eyep=[0,0,0],200,10 sec=10 data_name=poly_n_pyramid name=out/pn_pyramid5 init_sec=5 n=1 : wh : 305693/307200(99.5%) : rest 3.13s : 2018/04/03 10:16:01 wh : 306936/307200(99.9%) : rest 0.54s : 2018/04/03 10:15:59 wh : 307200/307200(100.0%) : fin 10m 38.03s
v14のとき wh : 307200/307200(100.0%) : fin 8m 22.68s だったので (10*60+38.03) / (8*60+22.68) * 100 = 126.92 100 - 126.92 = -26.92
26.92パーセントの低下です。
ちびちび速度アップしてきたのに、 map, filter への安易な対策が足を引っ張ってしまったかも (T_T)