WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
18086
Matching of regexps with ^ could be much faster
https://bugs.webkit.org/show_bug.cgi?id=18086
Summary
Matching of regexps with ^ could be much faster
Eric Seidel (no email)
Reported
2008-03-25 15:38:18 PDT
Matching of regexps with ^ could be much faster try /^bar/ on a really long string and watch Safari go off the deep end... It should immediately be able to detect that ^bar doesn't match.
Attachments
Make matching of regexps using ^ much faster
(4.63 KB, patch)
2008-03-25 15:39 PDT
,
Eric Seidel (no email)
no flags
Details
Formatted Diff
Diff
Test case which shows bug (warning, will hang Safari!)
(343 bytes, text/html)
2008-03-25 15:45 PDT
,
Eric Seidel (no email)
no flags
Details
Make matching of regexps using ^ much faster
(6.79 KB, patch)
2008-03-25 15:57 PDT
,
Eric Seidel (no email)
darin
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Eric Seidel (no email)
Comment 1
2008-03-25 15:39:20 PDT
Created
attachment 20049
[details]
Make matching of regexps using ^ much faster JavaScriptCore/pcre/pcre_compile.cpp | 20 ++++++++++++-------- JavaScriptCore/pcre/pcre_exec.cpp | 32 ++++++++++++++++++++++++-------- JavaScriptCore/pcre/pcre_internal.h | 2 ++ 3 files changed, 38 insertions(+), 16 deletions(-)
Eric Seidel (no email)
Comment 2
2008-03-25 15:44:11 PDT
***
Bug 18087
has been marked as a duplicate of this bug. ***
Eric Seidel (no email)
Comment 3
2008-03-25 15:45:31 PDT
Created
attachment 20051
[details]
Test case which shows bug (warning, will hang Safari!)
Eric Seidel (no email)
Comment 4
2008-03-25 15:49:26 PDT
I'm not sure where to put the test case. I guess I could put it in LayoutTests/fast/js/ (and make it "pass" if it completes w/o timing out).
Eric Seidel (no email)
Comment 5
2008-03-25 15:57:48 PDT
Created
attachment 20054
[details]
Make matching of regexps using ^ much faster JavaScriptCore/pcre/pcre_compile.cpp | 20 +++++++----- JavaScriptCore/pcre/pcre_exec.cpp | 32 +++++++++++++++----- JavaScriptCore/pcre/pcre_internal.h | 2 + LayoutTests/ChangeLog | 10 ++++++ .../fast/js/ascii-regexp-subject-expected.txt | 5 +++ LayoutTests/fast/js/ascii-regexp-subject.html | 13 ++++++++ .../fast/js/resources/ascii-regexp-subject.js | 18 +++++++++++ 7 files changed, 84 insertions(+), 16 deletions(-)
Darin Adler
Comment 6
2008-03-26 07:18:51 PDT
Comment on
attachment 20054
[details]
Make matching of regexps using ^ much faster r=me
Darin Adler
Comment 7
2008-03-28 09:07:37 PDT
Assigning to Eric, assuming that he will check it in.
Eric Seidel (no email)
Comment 8
2008-03-31 01:02:24 PDT
r31454
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug