WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
16582
Move optimization (like firstByte) branches outside jsRegExpExecute match loop
https://bugs.webkit.org/show_bug.cgi?id=16582
Summary
Move optimization (like firstByte) branches outside jsRegExpExecute match loop
Eric Seidel (no email)
Reported
2007-12-23 01:40:26 PST
Move optimization (like firstByte) branches outside jsRegExpExecute match loop There is no reason for us to test the firstByte optimization each time through the inner jsRegExpExecute loop. firstByte is determined outside of that loop. We should just have different static inline functions (or a template function) for the various different loop cases, and call the right function to handle an optimized inner loop. See also
bug 16581
for other issues with this function.
Attachments
More cleanup to jsRegExpExecute
(14.57 KB, patch)
2007-12-23 20:56 PST
,
Eric Seidel (no email)
no flags
Details
Formatted Diff
Diff
Compiles and runs, 4 regressions
(22.86 KB, patch)
2007-12-23 20:56 PST
,
Eric Seidel (no email)
no flags
Details
Formatted Diff
Diff
Continue moving more code into class structures
(3.19 KB, patch)
2007-12-23 20:56 PST
,
Eric Seidel (no email)
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Eric Seidel (no email)
Comment 1
2007-12-23 01:41:09 PST
We're spending about 0.1% of total time (across all tests) on sunspider in these optimization branches.
Eric Seidel (no email)
Comment 2
2007-12-23 20:54:40 PST
I tried hard to avoid solving
bug 16581
at the same time... but I think I mostly just made things messier by avoiding it. Ick. I guess the one crucial piece which stands in my way before solving
bug 16581
is understanding how the offset vector "scratch space" (the last 1/3rd of the vector) is used during execution. It was not clear to me last time I looked at the code.
Eric Seidel (no email)
Comment 3
2007-12-23 20:56:35 PST
Created
attachment 18084
[details]
More cleanup to jsRegExpExecute JavaScriptCore/pcre/pcre_exec.cpp | 262 ++++++++++++++++++++----------------- 1 files changed, 140 insertions(+), 122 deletions(-)
Eric Seidel (no email)
Comment 4
2007-12-23 20:56:37 PST
Created
attachment 18085
[details]
Compiles and runs, 4 regressions JavaScriptCore/pcre/pcre_exec.cpp | 432 ++++++++++++++++++++++--------------- 1 files changed, 259 insertions(+), 173 deletions(-)
Eric Seidel (no email)
Comment 5
2007-12-23 20:56:39 PST
Created
attachment 18086
[details]
Continue moving more code into class structures JavaScriptCore/pcre/pcre_exec.cpp | 33 ++++++++++++++++++--------------- 1 files changed, 18 insertions(+), 15 deletions(-)
Eric Seidel (no email)
Comment 6
2007-12-23 20:57:46 PST
So this still has 4 regressions. I'm not sure why. The code is better, and probably faster... but in an ugly middle state where it's not quite using classes like it should. I'm a bit worn from hacking on this patch for so long, so I will plan to come back to it later this week and fix the regressions.
Alexey Proskuryakov
Comment 7
2010-06-11 16:57:14 PDT
Seems obsolete, one can Shark again to find what to optimize in JavaScriptCore.
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