CausalInference.jl icon indicating copy to clipboard operation
CausalInference.jl copied to clipboard

Exact score based algorithm optimizations

Open mwien opened this issue 1 year ago • 0 comments

Some fairly free optimizations. I benchmarked briefly for graphs with 16 vertices.

  • avoiding the unnecessary memoizations by calling local_score_ directly: reduces execution time from ~2.5s to ~1.2s (so roughly 1s faster)
  • removing @view which I think can hurt because the submatrix is not contiguous: reduces execution time from ~1.2s to ~1.1s

We should definitely fix the first point (that was just an oversight that these calls are memoized)...

Second point we could benchmark GES on larger graphs first

UPDATE: the @view thing doesn't make a big difference for GES, so I have no big preference whether we keep it

mwien avatar Sep 22 '24 14:09 mwien