Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance Optimizations #15

Open
aslanides opened this issue May 6, 2017 · 1 comment
Open

Performance Optimizations #15

aslanides opened this issue May 6, 2017 · 1 comment
Assignees

Comments

@aslanides
Copy link
Owner

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 aslanides self-assigned this May 6, 2017
@aslanides
Copy link
Owner Author

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant