Skip to content

perf(semantic): reduce match arms in check_binding_identifier#12304

Merged
graphite-app[bot] merged 1 commit intomainfrom
07-15-perf_semantic_reduce_match_arms_in_check_binding_identifier_
Jul 16, 2025
Merged

perf(semantic): reduce match arms in check_binding_identifier#12304
graphite-app[bot] merged 1 commit intomainfrom
07-15-perf_semantic_reduce_match_arms_in_check_binding_identifier_

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Jul 15, 2025

Small optimization.

  1. First arm match on VariableDeclarator, instead of VariableDeclaration - requires 1 less iteration to get to.
  2. Remove match for Program. There's no point as iterator does that check on each turn of the loop anyway.

@github-actions github-actions bot added A-semantic Area - Semantic C-performance Category - Solution not expected to change functional behavior, only performance labels Jul 15, 2025
Copy link
Member Author

overlookmotel commented Jul 15, 2025


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 hot fixes, skip the queue and merge this PR next

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.

@codspeed-hq
Copy link

codspeed-hq bot commented Jul 15, 2025

CodSpeed Instrumentation Performance Report

Merging #12304 will not alter performance

Comparing 07-15-perf_semantic_reduce_match_arms_in_check_binding_identifier_ (b60d63b) with 07-15-refactor_semantic_refactor_check_binding_identifier_ (3c6b88b)

Summary

✅ 34 untouched benchmarks

@overlookmotel overlookmotel marked this pull request as ready for review July 15, 2025 15:59
@overlookmotel overlookmotel requested a review from Dunqing as a code owner July 15, 2025 15:59
@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Jul 16, 2025
Copy link
Member

Boshen commented Jul 16, 2025

Merge activity

@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jul 16, 2025
@overlookmotel overlookmotel force-pushed the 07-15-perf_semantic_reduce_match_arms_in_check_binding_identifier_ branch from 9d37edc to f5e99a8 Compare July 16, 2025 17:44
@overlookmotel overlookmotel force-pushed the 07-15-refactor_semantic_refactor_check_binding_identifier_ branch from 6d0c3d1 to 00c24f1 Compare July 16, 2025 17:44
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Jul 16, 2025
Small optimization.

1. First arm match on `VariableDeclarator`, instead of `VariableDeclaration` - requires 1 less iteration to get to.
2. Remove match for `Program`. There's no point as iterator does that check on each turn of the loop anyway.
@graphite-app graphite-app bot force-pushed the 07-15-refactor_semantic_refactor_check_binding_identifier_ branch from 00c24f1 to 3c6b88b Compare July 16, 2025 18:50
@graphite-app graphite-app bot force-pushed the 07-15-perf_semantic_reduce_match_arms_in_check_binding_identifier_ branch from f5e99a8 to b60d63b Compare July 16, 2025 18:50
Base automatically changed from 07-15-refactor_semantic_refactor_check_binding_identifier_ to main July 16, 2025 19:00
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jul 16, 2025
@graphite-app graphite-app bot merged commit b60d63b into main Jul 16, 2025
25 checks passed
@graphite-app graphite-app bot deleted the 07-15-perf_semantic_reduce_match_arms_in_check_binding_identifier_ branch July 16, 2025 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-semantic Area - Semantic 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