Re: [PATCH] sha1_name: use bsearch_hash() for abbreviations

2018-03-21 Thread brian m. carlson
On Wed, Mar 21, 2018 at 09:24:06AM -0400, Derrick Stolee wrote: > On 3/20/2018 6:25 PM, Jonathan Tan wrote: > > On Tue, 20 Mar 2018 16:03:25 -0400 > > Derrick Stolee wrote: > > > One caveat about the patch: there is a place where I cast a sha1 hash > > > into a struct

Re: [PATCH] sha1_name: use bsearch_hash() for abbreviations

2018-03-21 Thread Derrick Stolee
On 3/20/2018 6:25 PM, Jonathan Tan wrote: On Tue, 20 Mar 2018 16:03:25 -0400 Derrick Stolee wrote: This patch updates the abbreviation code to use bsearch_hash() as defined in [1]. It gets a nice speedup since the old implementation did not use the fanout table at all.

Re: [PATCH] sha1_name: use bsearch_hash() for abbreviations

2018-03-20 Thread Jonathan Tan
On Tue, 20 Mar 2018 16:03:25 -0400 Derrick Stolee wrote: > This patch updates the abbreviation code to use bsearch_hash() as defined > in [1]. It gets a nice speedup since the old implementation did not use > the fanout table at all. You can refer to the patch as:

[PATCH] sha1_name: use bsearch_hash() for abbreviations

2018-03-20 Thread Derrick Stolee
This patch updates the abbreviation code to use bsearch_hash() as defined in [1]. It gets a nice speedup since the old implementation did not use the fanout table at all. One caveat about the patch: there is a place where I cast a sha1 hash into a struct object_id pointer. This is because the