Closed Bug 1645018 Opened 4 years ago Closed 4 years ago

Self-hosted String.prototype.concat

Categories

(Core :: JavaScript: Standard Library, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
mozilla79
Tracking Status
firefox79 --- fixed

People

(Reporter: evilpie, Assigned: evilpie)

Details

Attachments

(1 file)

While looking at some CacheIR logs for reddit.com I noticed that they use String.prototype.concat with two or three arguments quite often. Some of those even seem to be constant. I think we can get some wins from being able to inline a self-hosted concat implementation.

I benchmarked with a number of different argument counts. Take these results with a grain of salt, they are noisy.

Self-hosted

zero 86ms
one 97ms
two 119ms
three 188ms

C++

zero 120ms
one 180ms
two 240ms
three 300ms

Pushed by evilpies@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/5030e21b13a1
Self-host String.prototype.concat. r=anba
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla79
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: