xrevlog: experimental reimplementation of revlog in C

Masklinn masklinn at masklinn.net
Fri Nov 12 15:40:59 UTC 2010


On 2010-11-12, at 16:07 , Greg Ward wrote:
>>> Anyone know a good hashtable library for C?  ;-)
>> 
>> There's a thin hashtable implementation in bdiff.c that should be plenty
>> adequate. Hashes should be very nicely distributed, but you'll probably
>> still need 2n buckets to avoid excessive collisions. Fortunately, each
>> bucket can simply contain a pointer to the index entry, no need to store
>> the key in two places.
> 
> Ahh, thanks.  Part of me (the stupid, idealistic part) was actually
> looking forward to cracking open my undergrad data structures book and
> writing a little hashtable for fun.  My practical side now has an
> excuse not to do that.

Though your undergrad self can always use this as an excuse to try to improve the existing implementation.


More information about the Mercurial-devel mailing list