Closed
Bug 1050884
Opened 10 years ago
Closed 10 years ago
Remove redundant instructions when executing regexps
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla34
People
(Reporter: h4writer, Assigned: h4writer)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
2.96 KB,
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
Some low-hanging fruit that make a difference on execution time in octane-regexp.
Assignee | ||
Comment 1•10 years ago
|
||
Gave me some 50 - 100 points on octane-regexp. The initialization of MatchPairs isn't really necessary since they get init'ed to -1 in the interpreter (for sure) and I'm pretty sure in the jit too. (For safety I added debug code that would trip if this isn't the case)
Assignee: nobody → hv1989
Attachment #8470152 -
Flags: review?(bhackett1024)
Comment 2•10 years ago
|
||
Comment on attachment 8470152 [details] [diff] [review] Remove initializing MatchPairs Review of attachment 8470152 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/vm/RegExpObject.cpp @@ +555,5 @@ > + for (size_t i = 0; i < pairCount(); i++) { > + matches[0].start = -2; > + matches[0].limit = -2; > + } > +#endif I don't think this debug code is necessary, the JIT does initialize its saved registers (NativeRegExpMacroAssembler.cpp:250), but maybe add a comment above the allocOrExpand call saying that the RegExp engine fills in all the registers on a match.
Attachment #8470152 -
Flags: review?(bhackett1024) → review+
Assignee | ||
Comment 3•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/8b35df13bf69
Assignee | ||
Comment 4•10 years ago
|
||
Fix build failures. https://hg.mozilla.org/integration/mozilla-inbound/rev/0d22e48a9501 (Note this doesn't make a big difference on awfy, but locally this still gives this 50-100 point increase.)
Comment 5•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/8b35df13bf69 https://hg.mozilla.org/mozilla-central/rev/0d22e48a9501
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
Updated•10 years ago
|
Flags: qe-verify-
You need to log in
before you can comment on or make changes to this bug.
Description
•