4 ms·
Why Perl version of regexps returns near-instantly for same regexp ? I tested few other on regex101.com and none of them ran longer than a millisecond or two
by adql 4y ago
Why Perl version of regexps returns near-instantly for same regexp ?
I tested few other on regex101.com and none of them ran longer than a millisecond or two
- asicsp 4y agoThe article explains that: >On my laptop it takes about 20ms to do the search above with 16 characters - but by doubling the input string size to 32 characters, it takes over 12 minutes to finish. Exponential running time really does suck. I checked with 32 characters on regex101, and it says "Match 1 halted after 119986 step(s)" when you click the debug icon (click the message above the regex input box).
- kmoser 4y agoI tried with PHP 7.4.6 on my PC and the results were nearly instantaneous, even with the input string more than doubled to >32 chars. What's up with that?