While running this calculator with data from Krastorio2 & recommended mods, calling simplex takes 87+ seconds in master. With these optimizations, simplex takes around 5.2 seconds.
Some notes:
Updating BigInteger.js to a more recent version significantly reduces performance (5s -> 33s)
Using native BigInt in Rational reduces performance (5s -> 9s), but this may be an error in my use of BigInt
Numbers were captured while solving for 2 blue belt on latest Chrome
While running this calculator with data from Krastorio2 & recommended mods, calling
simplex
takes 87+ seconds in master. With these optimizations,simplex
takes around 5.2 seconds.Some notes: