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

Further reduce allocations in adler32.Write #3

Merged
merged 1 commit into from
Jan 19, 2017
Merged

Further reduce allocations in adler32.Write #3

merged 1 commit into from
Jan 19, 2017

Conversation

calmh
Copy link
Contributor

@calmh calmh commented Jan 18, 2017

So I missed that our usage pattern, in one case, is a Reset(), Write(), Reset(), Write() loop, which still causes an allocation for the window on every iteration. This adds an ugly, nested if that fixes that. It's not super beautiful, but it's a huge win in terms of allocations for that pattern...

So I missed that our usage pattern, in one case, is a Reset(), Write(),
Reset(), Write() loop, which still causes an allocation for the window
on every iteration. This adds an ugly, nested if that fixes that. It's
not super beautiful, but it's a huge win in terms of allocations for
that pattern...
@coveralls
Copy link

Coverage Status

Coverage remained the same at 66.667% when pulling 9d57f4e on kastelo:reduceallocs2 into 001f237 on chmduquesne:master.

@chmduquesne
Copy link
Owner

Makes sense with your usage pattern. I'll have to see if I can unify that accross all rollinghashes implementations.

@chmduquesne chmduquesne merged commit bc15909 into chmduquesne:master Jan 19, 2017
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

Successfully merging this pull request may close these issues.

None yet

3 participants