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
expression: update md5 hash to use hex #53003
Conversation
Welcome @qichengzx! |
Hi @qichengzx. Thanks for your PR. I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Hi @qichengzx. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #53003 +/- ##
================================================
+ Coverage 72.4412% 74.6087% +2.1675%
================================================
Files 1482 1508 +26
Lines 428430 447371 +18941
================================================
+ Hits 310360 333778 +23418
+ Misses 98853 93626 -5227
- Partials 19217 19967 +750
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Provide a benchmark result:
MD5HashNew
goos: linux
goarch: amd64
pkg: github.com/pingcap/tidb/pkg/expression
cpu: AMD Ryzen 7 5700G with Radeon Graphics
BenchmarkMD5Hash-16 7836616 177.2 ns/op 64 B/op 2 allocs/op
MD5HashOld
goos: linux
goarch: amd64
pkg: github.com/pingcap/tidb/pkg/expression
cpu: AMD Ryzen 7 5700G with Radeon Graphics
BenchmarkMD5Hash-16 3914863 307.7 ns/op 64 B/op 3 allocs/op
[LGTM Timeline notifier]Timeline:
|
b.ReportAllocs() | ||
for i := 0; i < b.N; i++ { | ||
MD5HashOld("abc") | ||
//MD5HashNew("abc") |
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.
Can we have both benchmarks? I.e. BenchmarkMD5HashOld
and BenchmarkMD5HashNew
.
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.
Can we have both benchmarks? I.e.
BenchmarkMD5HashOld
andBenchmarkMD5HashNew
.
I understand that generally only one benchmark method is used, with two specific methods executed inside, one improved and one old, and then the results are compared using the official tool benchstat
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Defined2014, ngaut, zanmato1984 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What problem does this PR solve?
Issue Number: close #53018
Problem Summary: md5 hash update
What changed and how does it work?
Performance optimization for md5 hash, use hex EncodeToString instead of fmt
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.