-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
*: use bytes.Equal to check byte slice equivalent #11706
Conversation
Codecov Report
@@ Coverage Diff @@
## master #11706 +/- ##
================================================
- Coverage 81.7276% 81.4327% -0.2949%
================================================
Files 430 429 -1
Lines 94279 92631 -1648
================================================
- Hits 77052 75432 -1620
- Misses 11802 11805 +3
+ Partials 5425 5394 -31 |
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #11706 +/- ##
================================================
- Coverage 81.7276% 81.4327% -0.2949%
================================================
Files 430 429 -1
Lines 94279 92631 -1648
================================================
- Hits 77052 75432 -1620
- Misses 11802 11805 +3
+ Partials 5425 5394 -31 |
/run-all-tests |
Good catch. LGTM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
cherry pick to release-3.0 failed |
It seems that, not for sure, we failed to cherry-pick this commit to release-3.0. Please comment '/run-cherry-picker' to try to trigger the cherry-picker if we did fail to cherry-pick this commit before. @amyangfei PTAL. |
/run-cherry-picker |
Signed-off-by: sre-bot <sre-bot@pingcap.com>
cherry pick to release-3.0 in PR #16174 |
Signed-off-by: sre-bot <sre-bot@pingcap.com>
cherry pick to release-3.1 in PR #16177 |
What problem does this PR solve?
bytes.Equal
is faster thanbytes.Compare() == 0
simple benchmark code snippet: https://play.golang.org/p/omqWdp4z0S9
What is changed and how it works?
change
bytes.Compare() == 0
withbytes.Equal
Check List
Tests
Code changes
Side effects
Related changes