いわて駐在研究日誌

OpenCAE、電子工作、R/C等、徒然なるままに

再度, iadjの見直し(8/17)

                                                                                                                                                              • +

[0:geometry - iadj] total cpu = 670.3566
[0:geometry - iadjb] total cpu = 3.291199
[0:geometry - elm2nod/bfc2nod] total cpu = 51.43323
[0:geometry - vol/area] total cpu = 0.1775513
[0:geometry - xyz_cg] total cpu = 7.4462891E-03
[0:geometry - xyz_cgf] total cpu = 1.6845703E-02
[0:geometry - nvec] total cpu = 0.2437134
[0:geometry - dl/dln/dfl/dfln] total cpu = 0.1266479
[0:geometry - bftype/jb] total cpu = 49.56512
[0:geometry - others] total cpu = 5.5236816E-02

[0:geometry] viewfactor preparation completed: total cpu = 775.2977

                                                                                                                                                              • +

ということで、iadjが85%を占めている。ここをもう少し抑えたい。

  • 比較する前に、simpleなsort関数を呼び出しているが、min、max関数を使う。 670.4s → 612 s (あまり変わらず) 
  • if文評価タイミングの入れ替え → 620s 変化なし
  • allocateで確保した一時配列の参照の仕方をメモリアクセスに合わせて見直し → 694.9s (あれ?増えた??)

なんか良いアルゴリズムはないものか。並列化に逃げるのもなぁ....。