Re: [PATCH v4 1/2] refs.c: optimize check_refname_component()

2014-06-01 Thread Andreas Schwab
David Turner dtur...@twopensource.com writes: +static unsigned char refname_disposition[] = { + 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 2, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

Re: [PATCH v4 1/2] refs.c: optimize check_refname_component()

2014-06-01 Thread Philip Oakley
From: David Turner dtur...@twopensource.com In a repository with many refs, check_refname_component can be a major contributor to the runtime of some git commands. One such command is git rev-parse HEAD Timings for one particular repo, with about 60k refs, almost all packed, are: Old: 35 ms

Re: [PATCH v4 1/2] refs.c: optimize check_refname_component()

2014-06-01 Thread Michael Haggerty
Thanks for splitting this up into two patches. See my comments below. On 06/01/2014 07:17 AM, David Turner wrote: In a repository with many refs, check_refname_component can be a major contributor to the runtime of some git commands. One such command is git rev-parse HEAD Timings for one