JWally / jsLPSolver

Simple OOP javaScript library to solve linear programs, and mixed integer linear programs
The Unlicense
420 stars 69 forks source link

[Optimisation] Improved performance by refactoring part of the code #7

Closed bchevalier closed 9 years ago

bchevalier commented 9 years ago

Some refactoring to include best practice JavaScript implementation. In the end I managed to avoid the issue of execution times varying depending on whether the solver was already used before or not. There is still some variation, but much smaller than before:

It looks like batching problems now only have a minor impact (although still present) on execution time.

Note: I did refactor for readability, because I needed to understand what was going on. Let me know if the style bothers you.