Am 26.09.2013 12:16, schrieb Fredrik Gustafsson:
> On Tue, Sep 24, 2013 at 11:50:16AM +0200, Karsten Blees wrote:
>> Tests can be reproduced with 'time echo "perfhash[map] <method> 1000" | 
>> ./test-hashmap', see test-hashmap.c for definition of method flags.
> So I'm still curious about the actual performance improvements for git.
> I runned git describe on the linux kernel with both the old hashmap and
> this new one:

Performance was never the primary issue, the intention of the performance tests 
was to ensure that the new implementation doesn't *slow down* git.

>From the original PATCH/RFC:
- O(1) remove
- builtin entry chaining
- ready-to-use FNV-1 hash functions
- unit test
- additions are ~twice as fast
- uses less memory

So, the new implementation allows us to get rid of workarounds such as the 
CE_UNHASHED flag, duplicate entry chaining code and hash_name() 
implementations. It also addresses the memory usage FIXME in hash.h.

The simplified API may help prevent bugs such as the broken entry chaining in 
name-hash.c (see commits 2548183, 395c735, 2092678).

Maybe we can also replace some of the custom hash table implementations in 
attr.c, decorate.c, fast-import.c and object.c (to name just a few...).

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to