Skip to content

merge all parser entrypoints to avoid codegen duplication. See lalrpop#65#211

Merged
k2d222 merged 1 commit into
mainfrom
parser-single-entrypoint
Jul 1, 2026
Merged

merge all parser entrypoints to avoid codegen duplication. See lalrpop#65#211
k2d222 merged 1 commit into
mainfrom
parser-single-entrypoint

Conversation

@k2d222

@k2d222 k2d222 commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

wgsl-parse took 25s to compile. The parser was running 7 times and generating 7x as much code. This is caused by a bug in the parser generator (lalrpop/lalrpop#65) which regenerates a full parser for each entry point (expressions, statements...) even if they share production rules.

In a subsequent PR, I'll reduce compile times further by including the generated parser code in the source instead of invoking lalrpop in build.rs. This should reduce compile times a lot more.

@k2d222 k2d222 force-pushed the parser-single-entrypoint branch from 5eef5b3 to e57d685 Compare June 30, 2026 18:34
@stefnotch stefnotch mentioned this pull request Jun 30, 2026
@k2d222 k2d222 merged commit 165bc7e into main Jul 1, 2026
16 of 18 checks passed
@k2d222 k2d222 deleted the parser-single-entrypoint branch July 1, 2026 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant