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

Use SearchValues for identitifers #168

Merged
merged 3 commits into from
Nov 23, 2024
Merged

Use SearchValues for identitifers #168

merged 3 commits into from
Nov 23, 2024

Conversation

sebastienros
Copy link
Owner

No description provided.

@sebastienros
Copy link
Owner Author

@lahma wanted to compare raw "Contains" usage. Then expanded with the current code path that uses it to parse an identifier in a loop checking each char, vs the vectorized version that won't use a loop.

From that I will try to remove the usage of the char map (for net80+) and run the higher level benchmarks

@lahma
Copy link
Collaborator

lahma commented Nov 22, 2024

In need to gather my thought with this probably some morning coffee, but conceptually looks good. It's fast with modern runtimes but legacy not so much, I don't mind though and Parlot is plenty fast anyway.

@sebastienros
Copy link
Owner Author

Added benchmarks specifically for SkipWhiteSpace slightly changedthe current implementation. Vectorization would help when there are bigger spans of spaces. A mathematical expression might not matter, but it could have a huge impact in things that use spaces as indentation (JSON, source code ...).

@sebastienros
Copy link
Owner Author

I had this idea that languages where it could matter would include new lines in their separators (liquid) so I benchmarked it with the vectorization or not and couldn't see a difference either.

@sebastienros sebastienros marked this pull request as ready for review November 23, 2024 20:22
@sebastienros sebastienros changed the title Identifiers benchmark Use SearchValues for identitifers Nov 23, 2024
@sebastienros sebastienros merged commit 616ae36 into main Nov 23, 2024
1 check passed
@sebastienros sebastienros deleted the sebros/benchmap branch November 23, 2024 20:29
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