Skip to content

perf(parser): reorder parse_statement match conditions#7645

Merged
graphite-app[bot] merged 1 commit intomainfrom
12-04-perf_parser_reorder_parse_statement_match_conditions
Dec 4, 2024
Merged

perf(parser): reorder parse_statement match conditions#7645
graphite-app[bot] merged 1 commit intomainfrom
12-04-perf_parser_reorder_parse_statement_match_conditions

Conversation

@Boshen
Copy link
Member

@Boshen Boshen commented Dec 4, 2024

For performance reasons, match orders are:

  1. plain if check
  2. check current token
  3. peek token

@graphite-app
Copy link
Contributor

graphite-app bot commented Dec 4, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “0-merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

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

Copy link
Member Author

Boshen commented Dec 4, 2024

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

@github-actions github-actions bot added A-parser Area - Parser C-performance Category - Solution not expected to change functional behavior, only performance labels Dec 4, 2024
@codspeed-hq
Copy link

codspeed-hq bot commented Dec 4, 2024

CodSpeed Performance Report

Merging #7645 will not alter performance

Comparing 12-04-perf_parser_reorder_parse_statement_match_conditions (d503a84) with main (e923e4e)

Summary

✅ 29 untouched benchmarks

@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Dec 4, 2024
Copy link
Member Author

Boshen commented Dec 4, 2024

Merge activity

  • Dec 4, 7:31 AM EST: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Dec 4, 7:31 AM EST: A user added this pull request to the Graphite merge queue.
  • Dec 4, 7:36 AM EST: A user merged this pull request with the Graphite merge queue.

For performance reasons, match orders are:
1. plain if check
2. check current token
3. peek token
@Boshen Boshen force-pushed the 12-04-perf_parser_reorder_parse_statement_match_conditions branch from 8599503 to d503a84 Compare December 4, 2024 12:31
@graphite-app graphite-app bot merged commit d503a84 into main Dec 4, 2024
@graphite-app graphite-app bot deleted the 12-04-perf_parser_reorder_parse_statement_match_conditions branch December 4, 2024 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0-merge Merge with Graphite Merge Queue A-parser Area - Parser 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.

1 participant