Skip to content

perf(linter/no-const-assign): use BindingPattern::get_symbol_ids#20533

Merged
graphite-app[bot] merged 1 commit intomainfrom
c/03-19-perf_linter_no-const-assign_use_bindingpattern_get_symbol_ids_
Mar 19, 2026
Merged

perf(linter/no-const-assign): use BindingPattern::get_symbol_ids#20533
graphite-app[bot] merged 1 commit intomainfrom
c/03-19-perf_linter_no-const-assign_use_bindingpattern_get_symbol_ids_

Conversation

@camc314
Copy link
Copy Markdown
Contributor

@camc314 camc314 commented Mar 19, 2026

this should be faster as it avoids a deref to get the symbol id

Copy link
Copy Markdown
Contributor Author

camc314 commented Mar 19, 2026


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent changes, fast-track this PR to the front of the merge queue

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@camc314 camc314 marked this pull request as ready for review March 19, 2026 21:06
Copilot AI review requested due to automatic review settings March 19, 2026 21:06
@github-actions github-actions bot added A-linter Area - Linter C-performance Category - Solution not expected to change functional behavior, only performance labels Mar 19, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Optimizes the eslint/no-const-assign linter rule’s handling of const/using variable declarators by iterating symbol IDs directly from the binding pattern.

Changes:

  • Replace get_binding_identifiers() + ident.symbol_id() with BindingPattern::get_symbol_ids() in NoConstAssign::run.

@camc314 camc314 force-pushed the c/03-19-perf_linter_no-const-assign_use_bindingpattern_get_symbol_ids_ branch from fe00bd7 to 2e1c700 Compare March 19, 2026 21:11
@camc314 camc314 force-pushed the c/03-19-feat_ast_add_method_to_retrieve_symbolid_s_from_bindingpattern branch 2 times, most recently from 4781da9 to 494f267 Compare March 19, 2026 21:12
@camc314 camc314 force-pushed the c/03-19-perf_linter_no-const-assign_use_bindingpattern_get_symbol_ids_ branch from 2e1c700 to 1a5811b Compare March 19, 2026 21:12
@camc314 camc314 self-assigned this Mar 19, 2026
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Mar 19, 2026

Merging this PR will not alter performance

✅ 4 untouched benchmarks
⏩ 52 skipped benchmarks1


Comparing c/03-19-perf_linter_no-const-assign_use_bindingpattern_get_symbol_ids_ (9ddfb42) with c/03-19-feat_ast_add_method_to_retrieve_symbolid_s_from_bindingpattern (76cd0b1)

Open in CodSpeed

Footnotes

  1. 52 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@graphite-app
Copy link
Copy Markdown
Contributor

graphite-app bot commented Mar 19, 2026

Merge activity

…20533)

this should be faster as it avoids a deref to get the symbol id
@graphite-app graphite-app bot force-pushed the c/03-19-feat_ast_add_method_to_retrieve_symbolid_s_from_bindingpattern branch from 494f267 to 76cd0b1 Compare March 19, 2026 21:29
@graphite-app graphite-app bot force-pushed the c/03-19-perf_linter_no-const-assign_use_bindingpattern_get_symbol_ids_ branch from 1a5811b to 9ddfb42 Compare March 19, 2026 21:30
Base automatically changed from c/03-19-feat_ast_add_method_to_retrieve_symbolid_s_from_bindingpattern to main March 19, 2026 21:41
@graphite-app graphite-app bot merged commit 9ddfb42 into main Mar 19, 2026
23 checks passed
@graphite-app graphite-app bot deleted the c/03-19-perf_linter_no-const-assign_use_bindingpattern_get_symbol_ids_ branch March 19, 2026 21:42
costajohnt pushed a commit to costajohnt/oxc that referenced this pull request Mar 22, 2026
…xc-project#20533)

this should be faster as it avoids a deref to get the symbol id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter C-performance Category - Solution not expected to change functional behavior, only performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants