Skip to content

Conversation

@zesterer
Copy link
Owner

@zesterer zesterer commented Sep 24, 2025

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 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.

2 participants