Closed
Bug 974350
Opened 10 years ago
Closed 10 years ago
Optimize CreateRegExpMatchResult
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla30
People
(Reporter: jandem, Assigned: jandem)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
5.56 KB,
patch
|
h4writer
:
review+
|
Details | Diff | Splinter Review |
6.83 KB,
patch
|
h4writer
:
review+
|
Details | Diff | Splinter Review |
2.47 KB,
patch
|
h4writer
:
review+
|
Details | Diff | Splinter Review |
CreateRegExpMatchResult uses an AutoValueVector. It can store up to 8 values inline, but Octane-regexp often stores up to 12 values, so we have to malloc/free external elements. We could templatize AutoValueVector and bump the number of inline elements to 12, but this patch just gets rid of the AutoValueVector completely and fills the array directly. This is a small win on Octane-regexp and is also simpler I think.
Attachment #8378234 -
Flags: review?(hv1989)
Assignee | ||
Updated•10 years ago
|
Summary: Rewrite CreateRegExpMatchResult to not use an AutoValueVector → Optimize CreateRegExpMatchResult
Assignee | ||
Comment 1•10 years ago
|
||
There's some code in CreateRegExpMatchResult to deal with input == nullptr. In that case we allocate a string from chars + length. It looks like ExecuteRegExpLegacy is the only caller that can pass a nullptr input, so we can move this check there and eliminate some code/args from the hot path. Patch also removes some unnecessary roots.
Attachment #8378273 -
Flags: review?(hv1989)
Assignee | ||
Comment 2•10 years ago
|
||
Profile shows 0.4% or so under getOrCreateMatchResultTemplateObject called from CreateRegExpMatchResult. With this patch we inline the common matchResultTemplateObject_ != nullptr case. It's a puny win but simple to do.
Attachment #8378282 -
Flags: review?(hv1989)
Updated•10 years ago
|
Attachment #8378234 -
Flags: review?(hv1989) → review+
Updated•10 years ago
|
Attachment #8378273 -
Flags: review?(hv1989) → review+
Updated•10 years ago
|
Attachment #8378282 -
Flags: review?(hv1989) → review+
Assignee | ||
Comment 3•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/76618fcca721 https://hg.mozilla.org/integration/mozilla-inbound/rev/6e3f7835fa62 https://hg.mozilla.org/integration/mozilla-inbound/rev/dc46d95c4787
Comment 4•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/76618fcca721 https://hg.mozilla.org/mozilla-central/rev/6e3f7835fa62 https://hg.mozilla.org/mozilla-central/rev/dc46d95c4787
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
Comment 5•10 years ago
|
||
GGC octane-regexp appears to be 10% faster according to AWFY. Some improvement in GGC splay also.
Blocks: 806646
You need to log in
before you can comment on or make changes to this bug.
Description
•