Skip to content

ci(benchmarks/lexer): ensure next_token is inlined into lexer benchmark#15519

Merged
graphite-app[bot] merged 1 commit intomainfrom
11-09-ci_benchmarks_lexer_ensure_next_token_is_inlined_into_lexer_benchmark
Nov 9, 2025
Merged

ci(benchmarks/lexer): ensure next_token is inlined into lexer benchmark#15519
graphite-app[bot] merged 1 commit intomainfrom
11-09-ci_benchmarks_lexer_ensure_next_token_is_inlined_into_lexer_benchmark

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Nov 9, 2025

Preparatory step for #15513. That PR was showing a massive slowdown on lexer benchmarks, but it was only due to the change in that PR resulting in next_token not being inlined into the lexer benchmark.

Add a separate function next_token_for_benchmarks which has identical context as next_token, but is marked #[inline(always)], and use it in lexer benchmark instead. This fixes the problem with the benchmark in #15513.

@github-actions github-actions bot added the A-parser Area - Parser label Nov 9, 2025
Copy link
Member Author

overlookmotel commented Nov 9, 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 Nov 9, 2025

CodSpeed Performance Report

Merging #15519 will not alter performance

Comparing 11-09-ci_benchmarks_lexer_ensure_next_token_is_inlined_into_lexer_benchmark (fade858) with 11-09-ci_benchmarks_lexer_fix_lexer_benchmark (c8de3e4)

Summary

✅ 37 untouched

@overlookmotel overlookmotel marked this pull request as ready for review November 9, 2025 16:25
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Nov 9, 2025
@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 9, 2025

Merge activity

…mark (#15519)

Preparatory step for #15513. That PR was showing a massive slowdown on lexer benchmarks, but it was only due to the change in that PR resulting in `next_token` not being inlined into the lexer benchmark.

Add a separate function `next_token_for_benchmarks` which has identical context as `next_token`, but is marked `#[inline(always)]`, and use it in lexer benchmark instead. This fixes the problem with the benchmark in #15513.
@graphite-app graphite-app bot force-pushed the 11-09-ci_benchmarks_lexer_fix_lexer_benchmark branch from c8de3e4 to 4a53d09 Compare November 9, 2025 16:45
@graphite-app graphite-app bot force-pushed the 11-09-ci_benchmarks_lexer_ensure_next_token_is_inlined_into_lexer_benchmark branch from fade858 to 0ce9850 Compare November 9, 2025 16:46
Base automatically changed from 11-09-ci_benchmarks_lexer_fix_lexer_benchmark to main November 9, 2025 16:51
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Nov 9, 2025
@graphite-app graphite-app bot merged commit 0ce9850 into main Nov 9, 2025
22 checks passed
@graphite-app graphite-app bot deleted the 11-09-ci_benchmarks_lexer_ensure_next_token_is_inlined_into_lexer_benchmark branch November 9, 2025 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-parser Area - Parser

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants