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

Build optimized regex from string list #132

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

mvorisek
Copy link
Contributor

@mvorisek mvorisek commented Jun 18, 2024

extracted from #119 as requested

Total Tokenizer runtime reduction is about -20%.

See https://3v4l.org/JKn6D/rfc#vgit.master_jit repro repro for the matching speed difference.

@mvorisek mvorisek force-pushed the fix_perf_build_regexes_optimized branch from ce1cfb8 to e2a9b0d Compare June 23, 2024 05:43
@mvorisek mvorisek marked this pull request as ready for review June 23, 2024 05:45
@mvorisek mvorisek mentioned this pull request Jun 23, 2024
Copy link
Member

@greg0ire greg0ire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Such clever tricks should come with an explanation (located in the description of makeRegexFromList).

src/Tokenizer.php Show resolved Hide resolved
@mvorisek mvorisek force-pushed the fix_perf_build_regexes_optimized branch from e2a9b0d to 41606cd Compare June 23, 2024 10:11
@mvorisek
Copy link
Contributor Author

done - description above the private method added

@greg0ire greg0ire added this to the 1.5.0 milestone Jun 24, 2024
@greg0ire greg0ire merged commit b426bc5 into doctrine:1.5.x Jun 24, 2024
10 checks passed
@greg0ire
Copy link
Member

Thanks @mvorisek !

@mvorisek mvorisek deleted the fix_perf_build_regexes_optimized branch June 24, 2024 07:01
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.

3 participants