Skip to content

Allow enabling/disabling PCRE JIT after regex was compiled #11511

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

Closed

Conversation

iluuu1994
Copy link
Member

Previously, when the regex was first encountered it would be compiled with or without JIT and be executed accordingly. With this PR, a regex will be executed with or without JIT depending on the current state of PCRE_G(jit). Moreover, if the regex was previously compiled with JIT disabled, JIT compilation will be done when executing the regex for the first time after enabling the JIT.

@iluuu1994 iluuu1994 force-pushed the pcre-disable-jit-after-compiling branch from b7e8b48 to 42c9851 Compare June 23, 2023 09:56
Previously, when the regex was first encountered it would be compiled with or
without JIT and be executed accordingly. With this PR, a regex will be executed
with or without JIT depending on the current state of PCRE_G(jit). Moreover, if
the regex was previously compiled with JIT disabled, JIT compilation will be
done when executing the regex for the first time after enabling the JIT.
@iluuu1994 iluuu1994 force-pushed the pcre-disable-jit-after-compiling branch from 42c9851 to 047a2dd Compare June 26, 2023 17:02
@iluuu1994
Copy link
Member Author

There's still an overhead of ~0.2% for Symfony. As there's almost no use-case for this feature I don't think it is worth it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant