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

Reuse state in MessageDigest #131

Merged
merged 1 commit into from
Oct 15, 2020

Conversation

SalusaSecondus
Copy link
Contributor

Description of changes:
By reusing the underlying state in our implementations of MessageDigest we can reduce our allocation rate from ~304 bytes per hash (minimum) to ~48 bytes per hash.

This also removes some related unused code and simplifies some related logic to avoid initializing state multiple times.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@SalusaSecondus SalusaSecondus added the Performance Performance improvements label Oct 15, 2020
Copy link

@AzeemJiva AzeemJiva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SalusaSecondus SalusaSecondus merged commit c69cfe2 into corretto:develop Oct 15, 2020
@SalusaSecondus SalusaSecondus deleted the hash_reusestate branch October 15, 2020 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Performance Performance improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants