From: Jeff King <peff@peff.net>
To: Stefan Beller <stefanbeller@gmail.com>
Cc: Patrick Reynolds <patrick.reynolds@github.com>,
Git <git@vger.kernel.org>
Subject: Re: [PATCH v2] use a hashmap to make remotes faster
Date: Fri, 5 Sep 2014 11:16:26 -0400 [thread overview]
Message-ID: <20140905151626.GA1846@peff.net> (raw)
In-Reply-To: <5409887A.1000602@gmail.com>
On Fri, Sep 05, 2014 at 11:55:06AM +0200, Stefan Beller wrote:
> > struct remote {
> > + struct hashmap_entry ent; /* must be first */
> > +
>
> I stumbled about this comment "/* must be first */"
> when reading the changelog.
>
> Why does it need to be first?
> Is it a common reason I'm just not aware of,
> or would it make sense to put the reason into the comment as well?
Yes, it's a requirement of the hashmap code. It stores arbitrary
structs, but uses the front of the type for its bookkeeping data (the
hash and a linked list pointer to the next item in the bucket). This is
documented in Documentation/technical/api-hashmap.txt.
-Peff
prev parent reply other threads:[~2014-09-05 15:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-29 14:43 [PATCH v2] use a hashmap to make remotes faster Patrick Reynolds
2014-07-29 17:46 ` Jeff King
2014-07-30 18:26 ` Junio C Hamano
2014-09-05 9:55 ` Stefan Beller
2014-09-05 15:16 ` Jeff King [this message]
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=20140905151626.GA1846@peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=patrick.reynolds@github.com \
--cc=stefanbeller@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).