Skip to content

perf(semantic): inline enter_kind for FormalParameterRest#17403

Merged
graphite-app[bot] merged 1 commit intomainfrom
c/12-27-perf_semantic_inline_enter_kind_for_formalparameterrest_
Dec 27, 2025
Merged

perf(semantic): inline enter_kind for FormalParameterRest#17403
graphite-app[bot] merged 1 commit intomainfrom
c/12-27-perf_semantic_inline_enter_kind_for_formalparameterrest_

Conversation

@camc314
Copy link
Contributor

@camc314 camc314 commented Dec 27, 2025

Ref #18098

@camc314 camc314 marked this pull request as ready for review December 27, 2025 22:31
@camc314 camc314 requested a review from Dunqing as a code owner December 27, 2025 22:31
Copilot AI review requested due to automatic review settings December 27, 2025 22:31
Copy link
Contributor Author

camc314 commented Dec 27, 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.

@github-actions github-actions bot added the A-semantic Area - Semantic label Dec 27, 2025
@camc314 camc314 self-assigned this Dec 27, 2025
@github-actions github-actions bot added the C-performance Category - Solution not expected to change functional behavior, only performance label Dec 27, 2025
@camc314 camc314 force-pushed the c/12-27-perf_semantic_inline_enter_kind_for_formalparameterrest_ branch 2 times, most recently from d4bc068 to 5890ba9 Compare December 27, 2025 22:33
Copy link
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

This PR optimizes the semantic builder by inlining the enter_kind logic for FormalParameterRest, eliminating the overhead of matching in the enter_kind method. A secondary unrelated optimization to the references.retain closure is also included.

  • Adds custom visit_formal_parameter_rest method that directly calls param.bind(self) after enter_node
  • Removes FormalParameterRest match arm from enter_kind
  • Changes references.retain closure parameter from |&reference_id| to |reference_id| with explicit dereference

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 27, 2025

CodSpeed Performance Report

Merging #17403 will not alter performance

Comparing c/12-27-perf_semantic_inline_enter_kind_for_formalparameterrest_ (7284b76) with main (585ddf8)

Summary

✅ 42 untouched
⏩ 3 skipped1

Footnotes

  1. 3 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
Contributor

graphite-app bot commented Dec 27, 2025

Merge activity

@graphite-app graphite-app bot force-pushed the c/12-27-perf_semantic_inline_enter_kind_for_formalparameterrest_ branch from 5890ba9 to 7284b76 Compare December 27, 2025 22:39
@graphite-app graphite-app bot merged commit 7284b76 into main Dec 27, 2025
27 checks passed
@graphite-app graphite-app bot deleted the c/12-27-perf_semantic_inline_enter_kind_for_formalparameterrest_ branch December 27, 2025 22:45
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