Updates:
Status: Duplicate
Mergedinto: 831
Comment #2 on issue 1259 by [email protected]: RegExp matching is too
slow in case of iterative matching of alternatives
http://code.google.com/p/v8/issues/detail?id=1259
The 676063 bug was about the PCRE implementation that was used before the
irregexp engine. The problem is still the same, though, and it's inherent
in the way RegExps are specified.
It is correct that writing regexps that cause a lot of back-tracking can
cause an exponential blowup in the time a RegExp takes to run. While it
might be possible to detect this in some simple cases, the general problem
isn't solvable (at least not any faster than running the RegExp).
In V8, we rely on the embedder to stop long-running scripts
like "while(true);", and the same applies to long-running RegExps.
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev