Performance improvement to FlattenSubstrings

RESOLVED FIXED in mozilla22

Status

()

RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: h4writer, Assigned: h4writer)

Tracking

(Blocks: 1 bug)

unspecified
mozilla22
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
I introduced FlattenSubstrings in #847682 . Looks like there is a small improvement possible over that implementation. This is a 8% improvement on "str92.replace(/\b\w+\b/g, '');". It has to concat a lot of matches and "stableStr->getChars(cx);" was showing in the profile.

(I also added a small nit. rdata.dollar is the first occurence of "$" in rdata.repstr. Because we test rdata.repstr->length() == 0, rdata.dollar should also not be set)
(Assignee)

Comment 1

6 years ago
Created attachment 724273 [details] [diff] [review]
Patch
Assignee: general → hv1989
Attachment #724273 - Flags: review?(sstangl)
(Assignee)

Updated

6 years ago
Blocks: 806646

Updated

6 years ago
Attachment #724273 - Flags: review?(sstangl) → review+
https://hg.mozilla.org/mozilla-central/rev/eb428b0e2167
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in before you can comment on or make changes to this bug.