Closed
Bug 1697143
Opened 3 years ago
Closed 3 years ago
Use NewObjectGCKind for empty object literals
Categories
(Core :: JavaScript Engine, task, P3)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
88 Branch
Tracking | Status | |
---|---|---|
firefox88 | --- | fixed |
People
(Reporter: jandem, Assigned: jandem)
References
Details
Attachments
(2 files)
While working on optimizing Object.assign
(bug 1696178) I noticed empty object literals result in an object with no fixed slots. This means we usually have to allocate dynamic slots for Object.assign({}, from)
.
For new
(and the Object
constructor), we use NewObjectGCKind
which gives the object 4 fixed slots. This is sufficient for the majority of assign
calls on Reddit and Slack.
Looking at AWSY data this doesn't affect our memory usage numbers much.
Assignee | ||
Comment 1•3 years ago
|
||
This fixes a test issue with the next patch.
Assignee | ||
Comment 2•3 years ago
|
||
This helps avoid a lot of dynamic slot allocations on popular websites which
improves performance. AWSY seems unaffected.
Depends on D107632
Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/bf705899fc86 part 1 - Fix JSObject::sizeOfIncludingThisInNursery to not include fixed slots twice. r=jonco https://hg.mozilla.org/integration/autoland/rev/a527a3ec7f54 part 2 - Use NewObjectGCKind for empty object literals. r=jonco
Comment 4•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/bf705899fc86
https://hg.mozilla.org/mozilla-central/rev/a527a3ec7f54
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
status-firefox88:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•