-
Notifications
You must be signed in to change notification settings - Fork 665
perf(toml): add Scanner match() method, capturing numbers and bare key patterns using sticky regexp
#6538
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
perf(toml): add Scanner match() method, capturing numbers and bare key patterns using sticky regexp
#6538
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6538 +/- ##
==========================================
- Coverage 94.58% 94.57% -0.02%
==========================================
Files 579 579
Lines 43751 43703 -48
Branches 6494 6476 -18
==========================================
- Hits 41383 41331 -52
- Misses 2328 2329 +1
- Partials 40 43 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Scanner match() methodScanner match() method
kt3k
left a comment
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
I also did some benchmark test. Now the entire toml/parse_test.ts pass slightly faster than the main with this change. Nice work
~/denoland/std $ g co -; hyperfine -w 10 "deno test toml/parse_test.ts"
Switched to branch 'main'
Your branch is up to date with 'origin/main'.
Benchmark 1: deno test toml/parse_test.ts
Time (mean ± σ): 86.1 ms ± 21.9 ms [User: 61.8 ms, System: 25.5 ms]
Range (min … max): 64.9 ms … 179.2 ms 33 runs
~/denoland/std $ g co -; hyperfine -w 10 "deno test toml/parse_test.ts"
Switched to branch 'toml-add-Scanner-match-method'
Your branch is up to date with 'timreichen/toml-add-Scanner-match-method'.
Benchmark 1: deno test toml/parse_test.ts
Time (mean ± σ): 83.3 ms ± 16.8 ms [User: 61.2 ms, System: 25.4 ms]
Range (min … max): 67.6 ms … 142.8 ms 32 runs
Scanner match() methodScanner match() method, capturing numbers and bare key patterns using sticky regexp
This allows for more complex regexps match checks.