Vector in StringSegmentRange should have some inline capacity

RESOLVED FIXED in Firefox 55

Status

()

enhancement
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: jandem, Assigned: jandem)

Tracking

(Blocks 1 bug)

unspecified
mozilla55
Points:
---

Firefox Tracking Flags

(firefox55 fixed)

Details

(Whiteboard: [qf:p1])

Attachments

(2 attachments)

(Assignee)

Description

2 years ago
Posted 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.
(Assignee)

Comment 1

2 years ago
Posted 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)

Updated

2 years ago
Attachment #8847556 - Flags: review?(luke) → review+

Comment 2

2 years ago
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]

Comment 3

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/f307a6f0809f
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.