Hi Bhaskar,

On Tue, Oct 29, 2013 at 12:44:58AM -0400, Bhaskar Maddala wrote:
> Hello,
> 
>   Can you please take a look at [1]? Make sure it is what you had in mind,
> I read thru our conversation here again and I understood that the change we
> wanted to implement allowed selection of the hash function in addition to
> map-based/consistent and avalance.
> 
>    The change provide the ability to specify. <> indicates optional
> 
>   hash-type consistent <sdbm/djb2/wt6>
>   hash-type map-based <sdbm/djb2/wt6>
>   hash-type avalanche <sdbm/djb2/wt6>
> 
>   Not all of it is implemented, i am in the middle of testing, but wanted
> any early feed back you might have before i spent a lot of time on it.

I feel a bit bothered by having the if on the hash type done for
every single character. I'd rather have 3 hash functions that work
on (ptr, len) and call the right one with the string and length
instead.

It will also allow us to have clean hash functions resusable for
anything else.

Concerning the config, initially I thought that having a separate
keyword (eg: hash-algo) to set the algorithm was better than mixing
it with the hash-type keyword. But now I'm not completely sure about
this because probably people who want to set the algo will also want
to be sure about the type of hashing they're applying. I'd like to
get other users' feedback on this, particularly those using the
consistent hashing.

Thanks,
Willy


Reply via email to