Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pre-compute lexer DFA states for large regexes #110

Open
mmoskal opened this issue Jan 20, 2025 · 0 comments
Open

pre-compute lexer DFA states for large regexes #110

mmoskal opened this issue Jan 20, 2025 · 0 comments
Assignees

Comments

@mmoskal
Copy link
Collaborator

mmoskal commented Jan 20, 2025

For lexemes with large regexes (eg very large enums from JSON schema) we could run mock computation of mask on the tokenizer to pre-compute a bunch of lexer states. Otherwise, the first time we compute that mask there is cost. For 2k 50 byte enum entries it's about 4ms.

@mmoskal mmoskal self-assigned this Jan 20, 2025
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

No branches or pull requests

1 participant