diff options
author | Christian Couder <chriscool@tuxfamily.org> | 2009-06-13 09:21:06 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-06-13 21:47:34 +0400 |
commit | ebc9529f0358bdb10192fa27bc75f5d4e452ce90 (patch) | |
tree | a96512d00de09a2f767544f390cca87ca7844253 /t/t6012-rev-list-simplify.sh | |
parent | a66037c9755a2beb49bbd915e6f0dd9b1a732925 (diff) |
bisect: use a PRNG with a bias when skipping away from untestable commits
Using a PRNG (pseudo random number generator) with a bias should be better
than alternating between 3 fixed ratios.
In repositories with many untestable commits it should prevent alternating
between areas where many commits are untestable. The bias should favor
commits that can give more information, so that the bisection process
should not loose much efficiency.
HPA suggested to use a PRNG and found that the best bias is to raise a
ratio between 0 and 1 given by the PRNG to the power 1.5.
An integer square root function is implemented to avoid including
<math.h> and linking with -lm.
A PRNG function is implemented to get the same number sequence on
different machines as suggested by "man 3 rand".
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6012-rev-list-simplify.sh')
0 files changed, 0 insertions, 0 deletions