in reply to call perl hash function?
The hash algorithm is defined in the "PERL_HASH(hash, key, klen)" macro:
The last step was added in version 5.6 to improve distribution of lower bits in the resulting hash value.
If you just want a look at the hashing function, this is it. A look at the full source might give you a better feel for it. If you want to call this from perl, you can use Inline::C which automatically includes perl.h. Alternatively, you can reimplement this function in pure perl and use it from there.
|
---|