sql/catalog/resolver: remove an allocation, add a benchmark#72817
Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom Nov 17, 2021
Merged
sql/catalog/resolver: remove an allocation, add a benchmark#72817craig[bot] merged 1 commit intocockroachdb:masterfrom
craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
We didn't need to allocate this name except on error paths. Make that lazy. The added benchmark also shows that we do horrifically badly when using user-defined schemas and `search_path`. Yay for benchmarks. ``` name old time/op new time/op delta ResolveExistingObject/CREATE_TABLE_foo_()foo-16 2.18µs ± 5% 2.03µs ± 2% -6.96% (p=0.008 n=5+5) ResolveExistingObject/CREATE_SCHEMA_sc;CREATE_TABLE_sc.foo_()sc.foo-16 1.59µs ± 4% 1.53µs ± 4% ~ (p=0.063 n=5+5) ResolveExistingObject/CREATE_SCHEMA_sc;CREATE_TABLE_sc.foo_()foo-16 60.5µs ± 4% 60.1µs ± 6% ~ (p=0.690 n=5+5) name old alloc/op new alloc/op delta ResolveExistingObject/CREATE_TABLE_foo_()foo-16 72.4B ± 1% 7.6B ±18% -89.50% (p=0.008 n=5+5) ResolveExistingObject/CREATE_SCHEMA_sc;CREATE_TABLE_sc.foo_()sc.foo-16 69.4B ± 1% 5.0B ± 0% -92.80% (p=0.008 n=5+5) ResolveExistingObject/CREATE_SCHEMA_sc;CREATE_TABLE_sc.foo_()foo-16 11.2kB ± 0% 11.1kB ± 0% -0.56% (p=0.008 n=5+5) name old allocs/op new allocs/op delta ResolveExistingObject/CREATE_TABLE_foo_()foo-16 1.00 ± 0% 0.00 -100.00% (p=0.008 n=5+5) ResolveExistingObject/CREATE_SCHEMA_sc;CREATE_TABLE_sc.foo_()sc.foo-16 1.00 ± 0% 0.00 -100.00% (p=0.008 n=5+5) ResolveExistingObject/CREATE_SCHEMA_sc;CREATE_TABLE_sc.foo_()foo-16 75.0 ± 0% 74.0 ± 0% -1.33% (p=0.008 n=5+5) ``` Release note: None
Member
fqazi
reviewed
Nov 16, 2021
Collaborator
fqazi
left a comment
There was a problem hiding this comment.
Reviewed 3 of 4 files at r1, all commit messages.
Reviewable status:complete! 0 of 0 LGTMs obtained (waiting on @fqazi)
Contributor
Author
|
@fqazi was that an approval comment? |
fqazi
approved these changes
Nov 16, 2021
Collaborator
fqazi
left a comment
There was a problem hiding this comment.
Yes, forgot to hit LGTM
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @fqazi)
fqazi
reviewed
Nov 16, 2021
Collaborator
fqazi
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 1 of 0 LGTMs obtained (waiting on @fqazi)
Contributor
Author
|
TFTR bors r+ |
Contributor
|
Build failed (retrying...): |
Contributor
|
Build succeeded: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We didn't need to allocate this name except on error paths. Make that lazy.
The added benchmark also shows that we do horrifically badly when using
user-defined schemas and
search_path. Yay for benchmarks.Release note: None