Closed veezhang closed 1 year ago
fix: negative hex
Improve performance of checkVidFormat, the time is reduced by 92.22%.
checkVidFormat
92.22%
name old time/op new time/op delta checkVidFormat-8 1.17µs ± 0% 0.09µs ± 3% -92.22% (p=0.000 n=8+10)
Benchmark code:
func Benchmark_checkVidFormat(b *testing.B) { for i := 0; i < b.N; i++ { _ = checkVidFormat("-0xfedcba9876543210", true) _ = checkVidFormat("-076543210", true) _ = checkVidFormat("-9876543210", true) _ = checkVidFormat("hash(\"abcdefg\")", true) } }
This PR has been contained in others, so be free to close it.
fix: negative hex
Improve performance of
checkVidFormat
, the time is reduced by92.22%
.Benchmark code:
What type of PR is this?
What problem(s) does this PR solve?
Issue(s) number:
247
Description:
How do you solve it?
Special notes for your reviewer, ex. impact of this fix, design document, etc: