Closed
Bug 1175511
Opened 9 years ago
Closed 9 years ago
Use template objects for arguments object allocation
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla42
Tracking | Status | |
---|---|---|
firefox42 | --- | fixed |
People
(Reporter: jandem, Assigned: jandem)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
Right now in ArgumentsObject::create, we have to do two lookups for the initial shape and the ObjectGroup. This is slow. This patch stores a weak pointer to a template object for normal and strict arguments objects in JSCompartment. Then when we allocate an arguments object we can avoid the shape/group lookup if the compartment has a template object. It improves the micro-benchmark in bug 1175466 from 172 ms to 98 ms (on top of the patch in that bug).
Attachment #8623659 -
Flags: review?(bhackett1024)
Comment 1•9 years ago
|
||
Comment on attachment 8623659 [details] [diff] [review] Patch Review of attachment 8623659 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/vm/ArgumentsObject.cpp @@ +184,5 @@ > + > +ArgumentsObject* > +JSCompartment::getOrCreateArgumentsTemplateObject(JSContext* cx, bool strict) > +{ > + ArgumentsObject* obj = strict ? strictArgumentsTemplate_ : normalArgumentsTemplate_; If this was a ReadBarriered<ArgumentsObject*>& you could avoid the second branch on |strict| below I think.
Attachment #8623659 -
Flags: review?(bhackett1024) → review+
Comment 3•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/bdbeef387598
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox42:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in
before you can comment on or make changes to this bug.
Description
•