In 9.16, I introduced the RegEx class in order to keep the PHP code aesthetically close to what the JS equivalent would be. However, the performance for RegEx was atrocious because instead of stopping after the first match, it continued moving on to find all of the matches (preg_match vs preg_match_all).
This PR fixes the atrocious performance but doesn't quite match the performance seen in 9.15 and below. I'm currently seeing 0.15 seconds with this PR where 9.15 had 0.09 seconds. The difference is... fairly negligible compared to the 40 second time currently in 9.18.
In 9.16, I introduced the
RegEx
class in order to keep the PHP code aesthetically close to what the JS equivalent would be. However, the performance forRegEx
was atrocious because instead of stopping after the first match, it continued moving on to find all of the matches (preg_match
vspreg_match_all
).This PR fixes the atrocious performance but doesn't quite match the performance seen in 9.15 and below. I'm currently seeing 0.15 seconds with this PR where 9.15 had 0.09 seconds. The difference is... fairly negligible compared to the 40 second time currently in 9.18.
Fixes #78