Re: [PATCH 12/17] delta-islands: convert island_marks khash to use oids
- From
Jeff King <peff@peff.net>
- Date
- Jun 20, 2019, 18:29 UTC
- Message-ID
- <20190620182957.GD18704@sigill.intra.peff.net>
- In-Reply-To
- <20190620173823.23374-1-jonathantanmy@google.com>
On Thu, Jun 20, 2019 at 10:38:23AM -0700, Jonathan Tan wrote:
Show 12 quoted lines
> > @@ -154,7 +154,7 @@ static struct island_bitmap *create_or_get_island_marks(struct object *obj) > > khiter_t pos; > > int hash_ret; > > > > - pos = kh_put_sha1(island_marks, obj->oid.hash, &hash_ret); > > + pos = kh_put_oid_map(island_marks, obj->oid, &hash_ret); > > Thanks for doing this cleanup. The entire series (17 patches) look good > to me. The only remotely surprising thing to me was that OIDs are passed > by value on the stack, both for kh_get_oid_map() and kh_put_oid_map(), > but I see that this is how things currently work (and anyway, changing > this is beyond the scope of this patch set).
Thanks for reviewing. Yeah, the pass-by-value surprised me too, as it's been a while since I've had to touch khash. I think it all cancels out performance-wise because of the inlining, but it might be a fun thing to experiment with.
-Peff