You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perf(linter): id-length: reduce allocations and add more ASCII checks (#14821)
Previous PR (#14767) implemented an initial ASCII check, but I forgot to add it to the other identifier checks as well. This now adds the fast path ASCII check to all of the branches for this rule.
In addition, we no longer need to call `.to_string()` to allocate for each identifier, we can simply do the exceptions check with `&str`.
This should greatly benefit large files which have lots of identifiers, but this will pretty much universally improve perf on every file since this rule runs on every identifier and almost every JS file has identifiers.
<img width="714" height="535" alt="image" src="https://github.com/user-attachments/assets/f67a43e8-0e91-4f6d-805b-a031f9881c74" />
0 commit comments