lowrank/ray

way too slow

lowrank opened this issue · 4 comments

The trace-back part is too slow and hard to use parfor when forming the big matrix.

C++ might work better in this situation,

a few things to be careful:

  1. ode solver implementation can be based on float precision.
  2. generation sparse matrix, use I,J,V method for efficiency.
  3. ODE runs on 20 dimension vector. (4 vector, 4x4 Jacobian). Inside each one, it is serial.
  4. Since time lengths are different for each ray, parallel work balance should be also considered.
  5. adaptivity.

After profiling, the C++ version can be at least 4-6 times faster.

2 exps. each iteration costs 300s (no pit) and 600s (with pit).

use Julia now, 2.5x faster.