have an arena, it generates validating samples, runs the 2 algos, then compares the distance on validation inputs
It might be depending on the algorithm ! the number of time some parts are looped over during the run.
If we had an idea of the max size we would like to use it for, we could check that at that size, coeff is still irrelevant
algo | slope | y intercept | at 1000 |
---|---|---|---|
random 5 | E-10 | E-6 | +10% |
linear search | E-7 | E-7 | *1000 |
O(x2) : pre-treat with an sqrt before OLS, compare RMSE of both linear and quadratic models to see which one is best
Sometimes, if finds O(n) instead of O(n²). Maybe that’s not so much of an issue if the assertion checks that it’s at worst O(n²)
expect(Algorithm, warmups: 30, rounds: 20, sizes: […]).to be_xxx() or expect(Algorithm).to be_xxx(warmups: 30, rounds: 20, sizes: […])
algorithm | expect constant | expect linear |
---|---|---|
constant | regress both, find constant is better or linear with very small slope | will find a very small slope |
linear | should fail | should pass, but might be quadratic ! |