Re: [PATCH v2 2/2] oidset: use khash

2018-10-04 Thread René Scharfe
Am 04.10.2018 um 08:48 schrieb Jeff King: > On Thu, Oct 04, 2018 at 07:56:44AM +0200, René Scharfe wrote: > >>> As the comment above notes, I think we're really looking at the case >>> where this gets populated on the first call, but not subsequent ones. It >>> might be less hacky to use a

Re: [PATCH v2 2/2] oidset: use khash

2018-10-04 Thread Jeff King
On Thu, Oct 04, 2018 at 02:48:33AM -0400, Jeff King wrote: > On Thu, Oct 04, 2018 at 07:56:44AM +0200, René Scharfe wrote: > > > > As the comment above notes, I think we're really looking at the case > > > where this gets populated on the first call, but not subsequent ones. It > > > might be

Re: [PATCH v2 2/2] oidset: use khash

2018-10-04 Thread Jeff King
On Thu, Oct 04, 2018 at 07:56:44AM +0200, René Scharfe wrote: > > As the comment above notes, I think we're really looking at the case > > where this gets populated on the first call, but not subsequent ones. It > > might be less hacky to use a "static int initialized" here. Or if we > > want to

Re: [PATCH v2 2/2] oidset: use khash

2018-10-03 Thread René Scharfe
Am 03.10.2018 um 21:40 schrieb Jeff King: > On Wed, Oct 03, 2018 at 03:16:39PM +0200, René Scharfe wrote: >> diff --git a/fetch-pack.c b/fetch-pack.c >> index 75047a4b2a..a839315726 100644 >> --- a/fetch-pack.c >> +++ b/fetch-pack.c >> @@ -536,7 +536,7 @@ static int tip_oids_contain(struct oidset

Re: [PATCH v2 2/2] oidset: use khash

2018-10-03 Thread Jeff King
On Wed, Oct 03, 2018 at 03:16:39PM +0200, René Scharfe wrote: > Performance of a command that mainly checks for duplicate objects using > an oidset, with master and Clang 6.0.1: > > $ cmd="./git-cat-file --batch-all-objects --unordered --buffer > --batch-check='%(objectname)'" > > $

[PATCH v2 2/2] oidset: use khash

2018-10-03 Thread René Scharfe
Reimplement oidset using khash.h in order to reduce its memory footprint and make it faster. Performance of a command that mainly checks for duplicate objects using an oidset, with master and Clang 6.0.1: $ cmd="./git-cat-file --batch-all-objects --unordered --buffer