Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interface for hash functions #12

Open
Krakean opened this issue Nov 19, 2018 · 2 comments
Open

Interface for hash functions #12

Krakean opened this issue Nov 19, 2018 · 2 comments
Labels
enhancement New feature or request

Comments

@Krakean
Copy link

Krakean commented Nov 19, 2018

@MiloszKrajewski
Hello.
Can you provide here:

var HC = (byte) (XXH32.DigestOf(_buffer16, 0, _index16) >> 8);

and here:

var actualHC = (byte) (Farmhash.Sharp.Farmhash.Hash32(_buffer16, _index16) >> 8);

Ability to use other hash function via some kind of interface, or something like this? For those, who want to use something else than xxhash.
Specifically I would like to use Farmhash here which is faster than xxhash (depends on payload, though).

@MiloszKrajewski
Copy link
Owner

Please note that this hash is header hash: it is maximum 16 bytes, but 6 bytes most of the time.
I guess virtual (interface/Func<>) call takes more time than calculating this hash.

If you thinking about block/content hash it is not implemented yet at all (not written/ignored on read) but I'll think about making them pluggable somehow.

@MiloszKrajewski MiloszKrajewski added the enhancement New feature or request label Jan 3, 2019
@Krakean
Copy link
Author

Krakean commented Feb 10, 2019

@MiloszKrajewski no progress on this? :-\

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants