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

fix: remove unnecessary (*bytes.Buffer).Reset right after creating buffer #452

Conversation

odeke-em
Copy link
Contributor

@odeke-em odeke-em commented Dec 9, 2021

After a bytes.Buffer has been freshly created, there is no need to
invoke .Reset.

Fixes #451

…ffer

After a bytes.Buffer has been freshly created, there is no need to
invoke .Reset.

Fixes cosmos#451
@robert-zaremba robert-zaremba merged commit 258c337 into cosmos:master Dec 10, 2021
@odeke-em odeke-em deleted the fix-inefficient-use-of-bytes.Buffer-in-benchmarks branch December 10, 2021 01:50
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.

benchmarks: expensive/inefficient use of bytes.Buffer and .Reset() in benchmarking
2 participants