Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* do not use fmt.Sprintf in ParseFilters and ParsePredicates * avoid allocations for fixed tokens * optimize scanWhile loop * add scanEscaped fast path * optimize scanRegexp and scanEscaped using strings.Builder * optimize scanWhitespace * optimize selectScanner using switch ``` goos: linux goarch: amd64 pkg: github.com/zalando/skipper/eskip cpu: Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz │ HEAD~1 │ HEAD │ │ sec/op │ sec/op vs base │ ParsePredicates-8 29.88µ ± 3% 11.33µ ± 2% -62.09% (p=0.000 n=10) │ HEAD~1 │ HEAD │ │ B/op │ B/op vs base │ ParsePredicates-8 4.863Ki ± 0% 2.008Ki ± 0% -58.71% (p=0.000 n=10) │ HEAD~1 │ HEAD │ │ allocs/op │ allocs/op vs base │ ParsePredicates-8 198.00 ± 0% 33.00 ± 0% -83.33% (p=0.000 n=10) ``` Signed-off-by: Alexander Yastrebov <[email protected]>
- Loading branch information