-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
Improve sliceValidateError.Error
performance
#2765
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2765 +/- ##
=======================================
Coverage 98.70% 98.70%
=======================================
Files 41 41
Lines 2077 2085 +8
=======================================
+ Hits 2050 2058 +8
Misses 15 15
Partials 12 12
Continue to review full report at Codecov.
|
d0b97e2
to
df0d20e
Compare
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
@appleboy Hi, take a review :) |
@zihengCat Can you also add a benchmark report? |
Benchmark ReportBenchmark tests code placed in Command: Before
New
|
df0d20e
to
2779e0f
Compare
….Builder fix missing nil pointer check use simpler switch case add missing tests use for-loop instead of range add benchmark test codes
2779e0f
to
77a8f5e
Compare
sliceValidateError.Error
performance
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
Improve
sliceValidateError.Error
performance usingswitch
andstrings.Builder
.[]string
memory allocation.strings.Builder
instead ofstrings.Join
, one loop cycle is enough (strings.Join
runs a loop internally).