aixijs icon indicating copy to clipboard operation
aixijs copied to clipboard

Performance Optimizations

Open aslanides opened this issue 7 years ago • 1 comments

Here are some easy algorithmic improvements as well as performance tuning/optimization.

  1. I'm pretty sure we're re-drawing all of the plots at each iteration, which is unnecessarily quadratic. I think there's a big-ish speed-up to be had here (~30%) given how slow the real-time UI rendering currently is.
  2. Dirichlet model updates are O(1) (great!), but save() and load() are still O(N^2). I think we can get these down to O(m) (MCTS horizon) pretty easily, and that'll be a big win for environment scaling.

Check for V8 optimizations throughout using the profiler. Apparently it's not happy with let keywords, and can't optimize code that uses them.

aslanides avatar May 06 '17 13:05 aslanides

Dirichlet model is greatly improved now, with significantly faster run-time than the standard Bayes mixture now. All the gridsize-dependent scaling has been removed, and so now we can run this model on bigger and more interesting grids.

As for the plots: I've looked into this is a little bit, and it seems like a chunk of work to go through the d3 documentation to figure out how to re-write this. I'm not even sure if this is a bottleneck now -- it's hard to profile. Todo :)

aslanides avatar May 08 '17 03:05 aslanides