rapidash
rapidash copied to clipboard
Benchmark results not consistent ?
When I write my solution on the top of the other solutions the winner becomes my solution.
Code | Result |
---|---|
![]() |
![]() |
But if I write my solution after others the winner is changing.
Code | Result |
---|---|
![]() |
![]() |
Even if I write my solution twice the results are different.
Code | Result |
---|---|
![]() |
![]() |
The results actually can be normal because of the behavior of this kind of performance analysis. I'm just wondering these tests are reliable.
Maybe the usage of Benchmark.prototype.hz
is wrong 🤔
Actually its quite normal since the solutions are pretty close to each other. However, since the solutions are tested in dockerized environment it would minimize the difference
It is right but the problem is when I right my solution at the top "always" my solution wins and if I write the bottom the winner is changing. And the difference between these even between the duplicate solutions is 2x.
I don't think that it would depend order of the solutions but maybe there is a glitch
I am not sure if this is a bug, I will investigate this.