WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
146006
[JSC] Pre-bake final Structure for RegExp matches arrays.
https://bugs.webkit.org/show_bug.cgi?id=146006
Summary
[JSC] Pre-bake final Structure for RegExp matches arrays.
Andreas Kling
Reported
2015-06-15 22:18:46 PDT
RegExp matches arrays always have the "input" and "index" fields. We can save time by pre-baking a Structure with these fields already added instead of starting from scratch every time.
Attachments
Patch
(9.98 KB, patch)
2015-06-16 03:07 PDT
,
Andreas Kling
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Andreas Kling
Comment 1
2015-06-16 03:07:49 PDT
Created
attachment 254947
[details]
Patch regexp x2 34.85803+-0.22637 ^ 31.52553+-0.38239 ^ definitely 1.1057x faster :-)
Darin Adler
Comment 2
2015-06-16 10:48:55 PDT
Comment on
attachment 254947
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=254947&action=review
So many pointers that seem like they should be references! JavaScriptCore sometimes seems like it’s on a different continent from the rest of WebKit.
> Source/JavaScriptCore/runtime/RegExpMatchesArray.cpp:91 > + RELEASE_ASSERT(offset == indexPropertyOffset);
Why RELEASE_ASSERT instead of ASSERT exactly? I guess because this code is run only once and it would be really bad if this was untrue?
Andreas Kling
Comment 3
2015-06-16 11:12:28 PDT
(In reply to
comment #2
)
> Comment on
attachment 254947
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=254947&action=review
> > So many pointers that seem like they should be references! JavaScriptCore > sometimes seems like it’s on a different continent from the rest of WebKit.
Truth.
> > Source/JavaScriptCore/runtime/RegExpMatchesArray.cpp:91 > > + RELEASE_ASSERT(offset == indexPropertyOffset); > > Why RELEASE_ASSERT instead of ASSERT exactly? I guess because this code is > run only once and it would be really bad if this was untrue?
That was my thinking. It seemed more important when I was really sleepy, a regular assertion will do fine.
Andreas Kling
Comment 4
2015-06-16 11:38:51 PDT
Committed
r185597
: <
http://trac.webkit.org/changeset/185597
>
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