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

Feature request: subject string compilation #189

Open
scandum opened this issue Jan 12, 2023 · 2 comments
Open

Feature request: subject string compilation #189

scandum opened this issue Jan 12, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@scandum
Copy link

scandum commented Jan 12, 2023

I looked over the pcre documentation and couldn't find any mentions on this topic.

The situation I have is one where thousands of compiled PCREs are executed on the same subject string.

I was thinking performance could be notably improved if PCRE supported the compilation of the subject string?

@PhilipHazel PhilipHazel added the enhancement New feature or request label Jan 19, 2023
@PhilipHazel
Copy link
Collaborator

I presume by "compilation of the subject string" you mean some kind of pre-processing of the subject string with a view to speeding up matching. There is indeed nothing of this kind the the PCRE2 implementation, and I'm not sure what kind of "compilation" might work - and of course it would only be beneficial when there are many patterns and few strings, as in your case.

@scandum
Copy link
Author

scandum commented Jan 19, 2023

The number of strings shouldn't be relevant, just the regex vs string ratio. Two things come to mind.

  1. Locations of new lines in the subject string
  2. https://en.wikipedia.org/wiki/Bitmap_index

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants