Performance improvement in Decoder::decode_value#505
Merged
mpenick merged 5 commits intoapache:masterfrom Apr 6, 2021
Merged
Conversation
Contributor
|
Nice improvement! Thanks. Could you run |
Contributor
Author
done |
mpenick
reviewed
Apr 6, 2021
| current_ = next_++; | ||
| return decoder_.decode_value(current_->type, value_); | ||
| value_ = decoder_.decode_value(current_->type); | ||
| return !!value_.data_type(); |
Contributor
There was a problem hiding this comment.
What do you think about using the following for these checks?
return value.is_valid();where is_valid() is defined as:
bool Value::is_valid() {
return value_.data_type();
}
Contributor
Author
There was a problem hiding this comment.
looks good, it is more intuitive, will do the change
fsaporito
pushed a commit
to cloudian/cpp-driver
that referenced
this pull request
May 9, 2023
* - decode_row() performance improvement * - reduce branching Co-authored-by: Alex Revetchi <alex.revetchi@synchronoss.com>
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.
Please consider this optimisation, it gives about 39% improvement in decode_value, this results in 2-3% improvement in our production backend, which is considerable taking in account the scale of our deployments.
decode_value 7.55%, on the right side Value::operator= & Value::~Value

decode_value 4.67%
