Closed
Bug 877021
Opened 11 years ago
Closed 11 years ago
Speed up CreateRegExpMatchResult()
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla24
People
(Reporter: sstangl, Unassigned)
References
Details
Attachments
(2 files)
4.40 KB,
patch
|
h4writer
:
review+
|
Details | Diff | Splinter Review |
1.65 KB,
application/javascript
|
Details |
This makes roughly the same change as in Bug 876976, which affected .match(), but this time it affects .exec() and therefore affects that jQuery benchmark I intended to speed up in the first place.
Attachment #755132 -
Flags: review?(hv1989)
Reporter | ||
Comment 1•11 years ago
|
||
Microbenchmark. SM (unpatched): 630ms SM (patched): 220ms V8 (release): 210ms
Comment 2•11 years ago
|
||
That helps a bit. On the testcase in bug 876846 it takes my times from about 1450ns/iteration to about 1300ns/iteration. If I comment out these two calls, however: if (!SetPropertyHelper(cx, array, cx->names().index, index)) if (!SetPropertyHelper(cx, array, cx->names().input, inputVal)) then I get something closer to 800ns/iteration. Note that in the regexp in that testcase there aren't that many parens in the regexp...
Comment 3•11 years ago
|
||
Those should be using a define, not a set, btw, per spec... But using DefineNativeProperty doesn't seem to help too much in terms of performance. A lot of the time here seems to be doing updateSlotsForSpan and whatnot... Can we somehow preallocate this array with the right shape and slots?
Reporter | ||
Comment 4•11 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #3) > Can we somehow preallocate this array with the right shape and slots? Yeah, I'll look into that next.
Updated•11 years ago
|
Attachment #755132 -
Flags: review?(hv1989) → review+
Reporter | ||
Comment 5•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/b920312f99e3
Comment 6•11 years ago
|
||
Backed out for xpcshell orange. https://hg.mozilla.org/integration/mozilla-inbound/rev/278c0a105f8d https://tbpl.mozilla.org/php/getParsedLog.php?id=23621016&tree=Mozilla-Inbound
Comment 7•11 years ago
|
||
Gah, that was the wrong one to backout. You can re-land. Sorry about that :(
Comment 8•11 years ago
|
||
Re-landed. Sorry again for the mix-up. https://hg.mozilla.org/integration/mozilla-inbound/rev/782759aa8a03
Comment 9•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/782759aa8a03
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in
before you can comment on or make changes to this bug.
Description
•