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

Avoid creating temporary strings adding symbols to Grammar #38

Merged
merged 1 commit into from
Jun 2, 2023

Conversation

cwbaker
Copy link
Owner

@cwbaker cwbaker commented Jun 2, 2023

As mentioned by @mingodad in #36 pass lexemes as const char* to create and match symbols instead of creating temporary strings and passing them in. Greatly reduces memory allocations when parsing grammars.

@cwbaker cwbaker self-assigned this Jun 2, 2023
@cwbaker cwbaker force-pushed the avoid-string-temporaries-parsing-grammar branch from 325cf0c to 93160d6 Compare June 2, 2023 23:53
@cwbaker cwbaker merged commit 93160d6 into main Jun 2, 2023
@cwbaker cwbaker deleted the avoid-string-temporaries-parsing-grammar branch June 2, 2023 23:53
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