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

add benchmark cases for stream version hash #6

Open
gzm55 opened this issue Feb 24, 2020 · 0 comments
Open

add benchmark cases for stream version hash #6

gzm55 opened this issue Feb 24, 2020 · 0 comments

Comments

@gzm55
Copy link

gzm55 commented Feb 24, 2020

Now we have three type of inputs: byte[], ByteBuffer and DIrectBuffer. In many real scenarios, the input will be objects to be serialized to bytes or an io stream with uncertain length. Some hash implementation provide streaming api (e.g. Guava Hasher), which are verify convenient for these cases, and should have better performance.

We can split a fixed length byte[] array into some small pieces, and feed into a streaming api hash algo. A default streaming api to wrap a hash with only at-once api just records all updated bytes into a ByteBuffer, and calculate the whole result at once in finally().

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

No branches or pull requests

1 participant