diff options
author | Christian Couder <chriscool@tuxfamily.org> | 2009-06-13 07:21:06 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-06-13 10:47:34 -0700 |
commit | ebc9529f0358bdb10192fa27bc75f5d4e452ce90 (patch) | |
tree | a96512d00de09a2f767544f390cca87ca7844253 /tree.h | |
parent | t6030: test skipping away from an already skipped commit (diff) | |
download | tgif-ebc9529f0358bdb10192fa27bc75f5d4e452ce90.tar.xz |
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 'tree.h')
0 files changed, 0 insertions, 0 deletions