Skip to content

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

Merged
robert-zaremba merged 1 commit into
cosmos:masterfrom
orijtech:fix-inefficient-use-of-bytes.Buffer-in-benchmarks
Dec 10, 2021
Merged

fix: remove unnecessary (*bytes.Buffer).Reset right after creating buffer#452
robert-zaremba merged 1 commit into
cosmos:masterfrom
orijtech:fix-inefficient-use-of-bytes.Buffer-in-benchmarks

Conversation

@odeke-em

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

Copy link
Copy Markdown
Contributor

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

Development

Successfully merging this pull request may close these issues.

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

2 participants