Repository navigation
perf(lint/no-unsafe-enum-assignment): avoid redundant primitive comparisons - #1012
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
Merging this PR will degrade performance by 3.07%2 warnings
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
After checking enum identities, finish comparisons whose constrained types share the same primitive wrapper instead of recursively comparing identical prototype members. Keep structural comparisons for different wrappers and exclude template-literal and string-mapping types from the shortcut. The integration regression covers distinct enums, augmented primitive interfaces and primitive pairs with fast mode and semantic reporting both off/on.
Existing measurements from the original commit, before applying it to current main: Apple M2 Max, identical release helpers with fat LTO, one codegen unit, full symbols, no stripping or PGO,
TSRS_FAST=1, and exact frontend requests with all 61 rules and whole-program checking. Hyperfine 2 used warmups and alternating pairs: three at one worker, six at default workers. Counters and wall time cover the helper lifecycle, excluding Oxlint. Benchmarks were not rerun for this PR.Baseline → candidate medians for the four public lint projects in
bench/projects.json: