git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Couder <chriscool@tuxfamily.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	John Tapsell <johnflux@gmail.com>,
	Thomas Rast <trast@student.ethz.ch>
Subject: Re: [PATCH] rev-list: estimate number of bisection step left
Date: Thu, 19 Feb 2009 06:26:35 +0100	[thread overview]
Message-ID: <200902190626.36163.chriscool@tuxfamily.org> (raw)
In-Reply-To: <200902190616.18747.chriscool@tuxfamily.org>

Le jeudi 19 février 2009, Christian Couder a écrit :
> So the improved algorithm could be something like:
>
> static int estimate_bisect_steps(int all)
> {
> 	int n, x, e;
> 	float p;

Oops, the line above is not needed.

> 	if (all < 3)
> 		return 0;
>
> 	n = log2(all);
> 	e = exp2(n);
> 	x = all - e;
>
> 	return (e < 3 * x) ? n : n - 1 ;
> }

  reply	other threads:[~2009-02-19  5:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-17  5:09 [PATCH] rev-list: estimate number of bisection step left Christian Couder
2009-02-17  7:28 ` Junio C Hamano
2009-02-19  5:16   ` Christian Couder
2009-02-19  5:26     ` Christian Couder [this message]
2009-02-19  5:32     ` Christian Couder
2009-02-19  6:02       ` John Tapsell
2009-02-19  6:49         ` Christian Couder
2009-02-17 14:44 ` Johannes Schindelin
2009-02-17 15:11   ` John Tapsell
2009-02-17 15:31     ` Johannes Schindelin
2009-02-17 15:36       ` John Tapsell
2009-02-17 15:39         ` Johannes Schindelin
2009-02-17 15:39       ` Thomas Rast

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200902190626.36163.chriscool@tuxfamily.org \
    --to=chriscool@tuxfamily.org \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johnflux@gmail.com \
    --cc=mingo@elte.hu \
    --cc=trast@student.ethz.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).