Skip to content

Optimize grammar - #81

Open
melisgl wants to merge 5 commits into
3b:masterfrom
melisgl:optimize-grammar
Open

Optimize grammar#81
melisgl wants to merge 5 commits into
3b:masterfrom
melisgl:optimize-grammar

Conversation

@melisgl

@melisgl melisgl commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

This is on top of #80.

melisgl added 3 commits June 26, 2026 11:07
Use CHARACTER-RANGES, :USE-CACHE NIL, add guards to CODE and RAW-HTML,
and speed RAW-LINE by avoiding the backtracking operator in the common
case.

I measure this to be ~20% faster and to cons ~20% less.
@melisgl

melisgl commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Updated with a new version, which reimplements the STRING rule manually.

... by implementing it directly.

- Also, no longer treat disabled extensions' special chars as special.

- Rename it to the non-exported %STRING from CL:STRING.

~28% faster with ~40% less consing.
@melisgl
melisgl force-pushed the optimize-grammar branch 2 times, most recently from 4b86188 to 3e2bb0e Compare August 4, 2026 09:10
~3% faster, ~7% less consing
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