Nursery allocate cloned lexical environments

RESOLVED FIXED in Firefox 58

Status

()

enhancement
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: jandem, Assigned: jandem)

Tracking

(Blocks 1 bug)

unspecified
mozilla58
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox58 fixed)

Details

Attachments

(1 attachment)

Assignee

Description

2 years ago
Posted patch PatchSplinter Review
In LexicalEnvironmentObject::clone and LexicalEnvironmentObject::recreate we currently pass TenuredHeap but we can just use DefaultHeap AFAIK. We already nursery allocate other environment objects (CallObjects for instance) so I don't expect problems with this.

Improves the micro-benchmark below from 1550 ms to 700 ms.

function f() {
    var arr = [];
    for (var i = 0; i < 10000000; i++)
        arr.push({});
    var t = new Date;
    for (let i = 0; i < 10000000; i++) {
        g = () => i;
    }
    print(new Date - t);
}
f();
Attachment #8925877 - Flags: review?(jcoppeard)
Comment on attachment 8925877 [details] [diff] [review]
Patch

Review of attachment 8925877 [details] [diff] [review]:
-----------------------------------------------------------------

Yes this looks fine.
Attachment #8925877 - Flags: review?(jcoppeard) → review+

Comment 2

2 years ago
Pushed by jandemooij@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e4397a936799
Nursery allocate cloned LexicalEnvironmentObjects. r=jonco

Comment 3

2 years ago
Either this or the patch from bug 1415161 regressed some benchmarks from Ares 6 on AWFY.

Comment 4

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