Skip to content

perf(codegen): restructure print_comments to avoid index comparisons in loop#17402

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

perf(codegen): restructure print_comments to avoid index comparisons in loop#17402
graphite-app[bot] merged 1 commit intomainfrom
c/12-27-perf_codegen_restructure_print_comments_to_avoid_index_comparisons_in_loop

Conversation

@camc314
Copy link
Contributor

@camc314 camc314 commented Dec 27, 2025

The idea is that this is a hot-ish path, so if we can remove the index checks from within the hot loop, it should be faster

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 C-performance Category - Solution not expected to change functional behavior, only performance label Dec 27, 2025
@camc314 camc314 marked this pull request as ready for review December 27, 2025 21:42
@camc314 camc314 self-assigned this Dec 27, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Dec 27, 2025

CodSpeed Performance Report

Merging #17402 will not alter performance

Comparing c/12-27-perf_codegen_restructure_print_comments_to_avoid_index_comparisons_in_loop (55395f8) with c/12-27-perf_codegen_use_print_ascii_byte_in_more_places (d2e530b)

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.

@camc314 camc314 force-pushed the c/12-27-perf_codegen_restructure_print_comments_to_avoid_index_comparisons_in_loop branch 2 times, most recently from fbeb783 to 55395f8 Compare December 27, 2025 22:29
@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Dec 28, 2025
Copy link
Member

Boshen commented Dec 28, 2025

Merge activity

…in loop (#17402)

The idea is that this is a hot-ish path, so if we can remove the index checks from within the hot loop, it should be faster
@graphite-app graphite-app bot force-pushed the c/12-27-perf_codegen_use_print_ascii_byte_in_more_places branch from d2e530b to 7ec39d0 Compare December 28, 2025 05:00
@graphite-app graphite-app bot force-pushed the c/12-27-perf_codegen_restructure_print_comments_to_avoid_index_comparisons_in_loop branch from 55395f8 to 722fffa Compare December 28, 2025 05:01
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 28, 2025
Base automatically changed from c/12-27-perf_codegen_use_print_ascii_byte_in_more_places to main December 28, 2025 05:07
@graphite-app graphite-app bot merged commit 722fffa into main Dec 28, 2025
21 checks passed
@graphite-app graphite-app bot deleted the c/12-27-perf_codegen_restructure_print_comments_to_avoid_index_comparisons_in_loop branch December 28, 2025 05:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-codegen Area - Code Generation 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