Basically it calculates the commit to test at each step which gains the most information, under some trivial assumptions. The calculation is O(N) in the number of commits if you have a linear history, but it requires prefix-sum which is not O(N) on a DAG so it could be expensive if your history is complex.
Never got round to integrating it into git though.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...
That suggests that for a larger search space with a large enough difference, the optimal bisection point is probably not always the midpoint even if you know nothing about the distribution.
Perhaps someone can find the exact formula for selecting the next revision to search?
Almost. If only the last commit is slow, binary search is still faster.
Better off as in expected/average case. Good point, but only marginally better in the worse case.
Given the uncertainty I can see how this might be more efficient, especially if the variance of the heisenbug is high.
Is that supposed to be the log of the commit messages space?
Maybe it would have failed on the 292,613rd boot ...
It's particularly comforting when the reason for the failure/fix/change in behavior isn't completely understood.
But in order to contribute something useful, as a rule of thumb you want to have 10 times as many passes than failures in order to reject a commit. If a bug has taken up to 2500 runs to reproduce, don't consider it a pass until 30000 runs have succeeded.
It's something to do with Poisson distributions. If you have 𝑛 runs before a failed run on average, and you want to be 𝑃 % certain that a fix (including a revert or moving beyond the bug in a bisect) reduced the failure rate, you can use the formula − 𝑛 ln (1 − 𝑃 /100) for how long to run, and the factor for 𝑃=99.99 is about 10.
In fact that means that once you had landed on a merge commit it was probably much better to switch to a linear backwards search because it might have fewer passing runs and passing runs are 10-15 times more expensive as failures. Is that what you did?
Ha ha, nope! I tested each commit starting at the earliest, and it was the last one in the merge :-(