From: Christian Couder <chriscool@tuxfamily.org>
To: Jakub Narebski <jnareb@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH 07/10] bisect: automatically sort sha1_array if needed when looking it up
Date: Sun, 10 May 2009 06:44:14 +0200 [thread overview]
Message-ID: <200905100644.14786.chriscool@tuxfamily.org> (raw)
In-Reply-To: <m3ljp6me9v.fsf@localhost.localdomain>
Le samedi 9 mai 2009, Jakub Narebski a écrit :
> Christian Couder <chriscool@tuxfamily.org> writes:
> > This makes sha1_array easier to use, so later patches will be simpler.
>
> Hmmm... sort on lookup array. I wonder if it would be worth
> librarizing, and if there is any smart optimization for that (like
> e.g. heap for fast access to smallest value and fast insertion, using
> insertion sort for almost sorted array, etc.).
>
> BTW. does it become unsorted anywhere?
No, it doesn't. We first read all the "refs/bisect/good-*"
and "refs/bisect/skip-*" and put them in some "struct sha1_array".
Then later we may lookup sha1 there from 2 different functions:
"check_merge_bases" first and then "filter_skipped".
This patch optimizes by not sorting before we lookup, so if we don't lookup
anything, we pay no sorting price.
Best regards,
Christian.
next prev parent reply other threads:[~2009-05-10 4:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-09 15:55 [PATCH 00/10] bisect: port git bisect merge base checking to C Christian Couder
2009-05-09 15:55 ` [PATCH 01/10] bisect: use "sha1_array" to store skipped revisions Christian Couder
2009-05-09 15:55 ` [PATCH 02/10] bisect: implement "rev_argv_push" to fill an argv with revs Christian Couder
2009-05-09 15:55 ` [PATCH 03/10] bisect: store good revisions in a "sha1_array" Christian Couder
2009-05-09 15:55 ` [PATCH 04/10] bisect: use new "struct argv_array" to prepare argv for "setup_revisions" Christian Couder
2009-05-09 15:55 ` [PATCH 05/10] bisect: remove too much function nesting Christian Couder
2009-05-09 15:55 ` [PATCH 06/10] bisect: make skipped array functions more generic Christian Couder
2009-05-09 15:55 ` [PATCH 07/10] bisect: automatically sort sha1_array if needed when looking it up Christian Couder
2009-05-09 16:28 ` Jakub Narebski
2009-05-10 4:44 ` Christian Couder [this message]
2009-05-09 15:55 ` [PATCH 08/10] bisect: implement the "check_merge_bases" function Christian Couder
2009-05-09 15:55 ` [PATCH 09/10] bisect: add "check_good_are_ancestors_of_bad" function Christian Couder
2009-05-09 15:55 ` [PATCH 10/10] bisect: make "git bisect" use new "--next-all" bisect-helper function Christian Couder
2009-05-11 0:44 ` Junio C Hamano
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=200905100644.14786.chriscool@tuxfamily.org \
--to=chriscool@tuxfamily.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jnareb@gmail.com \
/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).