From: Daniel Barkalow <barkalow@iabervon.org>
To: Jeff King <peff@peff.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Junio C Hamano <gitster@pobox.com>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH 5/6] Do linear-time/space rename logic for exact renames
Date: Thu, 25 Oct 2007 16:23:37 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0710251606280.7345@iabervon.org> (raw)
In-Reply-To: <20071025194859.GB27745@coredump.intra.peff.net>
On Thu, 25 Oct 2007, Jeff King wrote:
> On Thu, Oct 25, 2007 at 03:43:46PM -0400, Daniel Barkalow wrote:
>
> > Creating a list of the pointers doesn't work correctly with the grow
> > implementation, because growing the hash may turn a collision into a
> > non-collision, at which point items other than the first cannot be found
> > (since they're listed inside a bucket that's now wrong for them). AFAIK,
> > resizing a hash table requires being able to figure out what happened with
> > collisions.
>
> I thought this at first, too, but there are two types of collisions in
> this hash implementation: those that come from having the actual 32-bit
> hash collide, and those that come from not having enough buckets.
>
> The client code gets a pointer kicked back to it when there is a
> collision on the actual hash value (i.e., two things had the exact same
> hash value). The number of buckets grows when you simply have more
> buckets filled than you like. Two different hashes that would be in the
> same bucket don't actually occupy the same bucket -- the second one to
> arrive gets shoved into the next available bucket.
Ah, right, nevermind. The comment might be a bit misleading in that case,
if we both missed this at first.
-Daniel
*This .sig left intentionally blank*
next prev parent reply other threads:[~2007-10-25 20:23 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <alpine.LFD.0.999.0710251112120.30120@woody.linux-foundation.or g>
2007-10-25 18:15 ` [PATCH 0/6] Cleaned-up rename detection patch-series Linus Torvalds
2007-10-25 18:16 ` [PATCH 1/6] Add 'diffcore.h' to LIB_H Linus Torvalds
2007-10-25 18:17 ` [PATCH 2/6] Split out "exact content match" phase of rename detection Linus Torvalds
2007-10-25 18:19 ` [PATCH 3/6] Ref-count the filespecs used by diffcore Linus Torvalds
2007-10-25 18:20 ` [PATCH 4/6] copy vs rename detection: avoid unnecessary O(n*m) loops Linus Torvalds
2007-10-26 22:53 ` Junio C Hamano
2007-10-26 23:10 ` Linus Torvalds
2007-10-26 23:27 ` Junio C Hamano
2007-10-26 23:36 ` Linus Torvalds
2007-10-25 18:23 ` [PATCH 5/6] Do linear-time/space rename logic for exact renames Linus Torvalds
2007-10-25 19:43 ` Daniel Barkalow
2007-10-25 19:48 ` Jeff King
2007-10-25 20:23 ` Daniel Barkalow [this message]
2007-10-25 20:25 ` Linus Torvalds
2007-10-25 21:37 ` Daniel Barkalow
2007-10-25 18:24 ` [PATCH 6/6] Do exact rename detection regardless of rename limits Linus Torvalds
2007-10-25 18:37 ` [PATCH 0/6] Cleaned-up rename detection patch-series Linus Torvalds
2007-10-25 19:08 ` Jeff King
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=Pine.LNX.4.64.0710251606280.7345@iabervon.org \
--to=barkalow@iabervon.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
--cc=torvalds@linux-foundation.org \
/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).