Closed Bug 1347489 Opened 7 years ago Closed 7 years ago

Vector in StringSegmentRange should have some inline capacity

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Performance Impact high
Tracking Status
firefox55 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Attached file Microbenchmark
The attached microbenchmark is based on the VanillaJS/Adding100Items part of Speedometer (the template engine).

I get the following numbers:

Nightly: 174 ms
Chrome:   73 ms

We spend a lot of time under RopeMatch resizing the Vector in StringSegmentRange. Pretty silly: giving this Vector an inline capacity of 8 improves our numbers to 65 ms or so.
Attached patch PatchSplinter Review
I suspect this Vector used to have inline capacity at some point but the move to GCVector/StringVector regressed it...
Attachment #8847556 - Flags: review?(luke)
Attachment #8847556 - Flags: review?(luke) → review+
Pushed by jandemooij@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f307a6f0809f
Give StringSegmentRange stack Vector some inline capacity to avoid malloc/free overhead. r=luke
Whiteboard: [qf:p1]
https://hg.mozilla.org/mozilla-central/rev/f307a6f0809f
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Performance Impact: --- → P1
Whiteboard: [qf:p1]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: