oxc/crates/oxc_linter
camchenry 5ae3f364e9 perf(linter): no-fallthrough: Use string matching instead of Regex for default comment pattern (#6008)
Profiling has shown this rule to be a consistent slow point, and in particular, the Regex construction is slow.

<img width="1323" alt="Screenshot 2024-09-23 at 7 12 58 PM" src="https://github.com/user-attachments/assets/1d9b367d-eeda-4b19-b0a3-463e54ac4334">

This PR improves the situation in two ways:

1. A `Regex` is only constructed when there is a custom comment pattern (which is likely the minority of cases)
2. For the default comment pattern (when no custom pattern is passed), we now use a simple string matcher function, instead of a full-blown regex matcher. I believe this should be faster since it involves much less work, though can still allocate a `String`.
2024-09-24 01:06:00 +00:00
..
examples refactor(semantic): impl IntoIterator for &AstNodes (#5873) 2024-09-19 03:22:29 +00:00
fixtures test: add trailing line breaks to conformance fixtures (#5541) 2024-09-06 12:55:17 +00:00
src perf(linter): no-fallthrough: Use string matching instead of Regex for default comment pattern (#6008) 2024-09-24 01:06:00 +00:00
tests
Cargo.toml release(oxlint): v0.9.7 (#5988) 2024-09-23 15:10:33 +08:00
CHANGELOG.md release(oxlint): v0.9.7 (#5988) 2024-09-23 15:10:33 +08:00