Re: [PATCH 1/3] sha1_name: Create perf test for find_unique_abbrev()

2017-09-18 Thread Junio C Hamano
Derrick Stolee writes: >> But I do not think we want this "clever" optimization that involves >> 'n' in the first place. + while (count++ < 10) { >>> + for (i = 0; i < n; i++) >>> + ((unsigned int*)oid.hash)[i] = hash_base; >> >> Does it

Re: [PATCH 1/3] sha1_name: Create perf test for find_unique_abbrev()

2017-09-18 Thread Derrick Stolee
On 9/17/2017 5:51 PM, Junio C Hamano wrote: Derrick Stolee writes: +int cmd_main(int ac, const char **av) +{ + setup_git_directory(); As far as I recall, we do not (yet) allow declaration after statement in our codebase. Move this down to make it after all

Re: [PATCH 1/3] sha1_name: Create perf test for find_unique_abbrev()

2017-09-17 Thread Junio C Hamano
Derrick Stolee writes: > +int cmd_main(int ac, const char **av) > +{ > + setup_git_directory(); As far as I recall, we do not (yet) allow declaration after statement in our codebase. Move this down to make it after all decls. > + > + unsigned int hash_delt =