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

how about higher quality hash algorithm? #323

Open
chen-zhuohan opened this issue Jun 29, 2022 · 1 comment
Open

how about higher quality hash algorithm? #323

chen-zhuohan opened this issue Jun 29, 2022 · 1 comment

Comments

@chen-zhuohan
Copy link
Contributor

chen-zhuohan commented Jun 29, 2022

Although hash algorithm is not the Bottleneck of bigcache, the smhasher(the project of hash function quality and speed tests) show that FVNa has poor quality while other hash func has higher.

Should we evaluate the default hash func of bigcache again? After the question and answer of hash, lots of new hash functions come out, such as xxhash, wyhash, menhash, which have higher quality.

Due to some hash functions use hardware instructions provided by the CPU to accelerate (AVX2, SSE), we can use different hash func in different Platform, such as:

  1. FVNa default
  2. xxhash in amd

By the way, why bigcache has no dependence? Should only no dependence PR can be approve?

Look forward to your reply!

@janisz
Copy link
Collaborator

janisz commented Jul 21, 2022

By the way, why bigcache has no dependence? Should only no dependence PR can be approve?

Making golang the only dependency makes this lib easy to use and update. I think we should keep it that way.

We have Hasher interface introduced in #5 to enable users using their own hash method. I think it will be great if you can create hasher implementation with benchmarks on different datasets and machines. We can link to it from readme so if anybody need it they are free to add dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants