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

[Replicated] opt/bench: fix benchmark regression #166

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mohini-crl
Copy link
Owner

Replicated from original PR cockroachdb#138740

Original author: mgartner
Original creation date: 2025-01-09T16:00:50Z

Original reviewers: yuzefovich

Original description:

opt/bench: fix benchmark regression

PR cockroachdb#138641 caused extra allocations for plan gist factories in optimizer
benchmarks. These allocations should not be included in benchmark
results, so they have been eliminated.

Release note: None

util/base64: use bytes.Buffer instead of strings.Builder in Encoder

For our purposes in base64-encoding plan gists, using bytes.Buffer in
Encoder causes fewer allocations, presumably because of a more
aggressive growth algorithm.

Epic: None

Release note: None

PR cockroachdb#138641 caused extra allocations for plan gist factories in optimizer
benchmarks. These allocations should not be included in benchmark
results, so they have been eliminated.

Release note: None
…der`

For our purposes in base64-encoding plan gists, using `bytes.Buffer` in
`Encoder` causes fewer allocations, presumably because of a more
aggressive growth algorithm.

Release note: None
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.

2 participants