Closed
Bug 504033
Opened 16 years ago
Closed 16 years ago
avoiding calling JSFinalizeStub.
Categories
(Core :: JavaScript Engine, enhancement)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: igor, Assigned: igor)
References
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file)
|
29.61 KB,
patch
|
brendan
:
review+
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #503461 comment 4 +++
When finalizing the objects we are always calling the finalization hook:
static void
js_FinalizeObject(JSContext *cx, JSObject *obj)
{
...
/* Finalize obj first, in case it needs map and slots. */
STOBJ_GET_CLASS(obj)->finalize(cx, obj);
For the default objects and arrays the finalization hook is the empty JSFinalizeStub method. We should investigate if avoiding this call via simple check for the sub method can speedup things.
| Assignee | ||
Comment 1•16 years ago
|
||
The patch allows to use null in place of JSFinalizeStub. This speed ups the GC phase of the following test case by about 1%:
function test()
{
var array = [];
for (var j = 0; j != 12; ++j) {
var array2 = [];
for (var i = 0; i != 1e5; ++i) {
array2.push({});
}
array.push(array2);
}
return array;
}
test();
var t = Date.now();
gc();
print(Date.now() - t);
Attachment #389489 -
Flags: review?(brendan)
Updated•16 years ago
|
Attachment #389489 -
Flags: review?(brendan) → review+
| Assignee | ||
Comment 2•16 years ago
|
||
Flags: wanted1.9.2?
Whiteboard: fixed-in-tracemonkey
Updated•16 years ago
|
Flags: wanted1.9.2? → wanted1.9.2+
Comment 3•16 years ago
|
||
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•