Skip to content
This repository was archived by the owner on Apr 2, 2026. It is now read-only.

Attempt to automagically generate jump tables for choice#881

Open
zesterer wants to merge 3 commits into
mainfrom
auto_jump_tables
Open

Attempt to automagically generate jump tables for choice#881
zesterer wants to merge 3 commits into
mainfrom
auto_jump_tables

Conversation

@zesterer

@zesterer zesterer commented Sep 24, 2025

Copy link
Copy Markdown
Owner

Attempts to automatically generate jump tables for choice nodes in cases where all child parsers support presenting a predicate.

Effectively, this is a 'free' optimisation that requires no changes to parser implementations.

Things would be improved even more if Rust supported first-class patterns, but alas.

There's more work to do, but the results are already positive (the 'vanilla' benchmarks are likely already optimised to jump tables and so do not experience the same speed-up).

image

@zesterer
zesterer force-pushed the main branch 2 times, most recently from 0f2b61a to e350fc6 Compare November 5, 2025 19:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant