Closed
Bug 1134611
Opened 10 years ago
Closed 8 years ago
Optimize Object.defineProperty
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
VERIFIED
DUPLICATE
of bug 1303335
Performance Impact | high |
People
(Reporter: jandem, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
4.19 KB,
patch
|
Details | Diff | Splinter Review |
See the micro-benchmark below. We're a good bit faster than V8, but JSC is way faster than us:
Safari: 186 ms
SM: 496 ms
d8: 848 ms
A profile shows there are some things we can optimize, and maybe we could self-host parts of defineProperty, but we should also see what JSC is doing here exactly.
This affects the Ember Object.create benchmark (bug 1097376).
var name = "Foo";
var desc = {configurable:true, writable:true, enumerable:false, value:null};
function f() {
var t = new Date;
for (var i=0; i<1000000; i++) {
globalO = {};
Object.defineProperty(globalO, name, desc);
}
print(new Date - t);
}
f();
Comment 1•10 years ago
|
||
It's really unfortunate that NativeHasProperty and NativeGetProperty seems to be relatively slow.
410 -> 319
Comment 2•10 years ago
|
||
Attachment #8566522 -
Attachment is obsolete: true
![]() |
||
Comment 3•8 years ago
|
||
Is this a dupe of bug 772334?
Comment 4•8 years ago
|
||
(In reply to Jan de Mooij [:jandem] from comment #0)
> A profile shows there are some things we can optimize, and maybe we could
> self-host parts of defineProperty, [...]
Bug 1303335 has a WIP patch to self-host Object.defineProperty (and Object.getOwnPropertyDescriptor).
Updated•8 years ago
|
Whiteboard: [qf]
Updated•8 years ago
|
Whiteboard: [qf] → [qf:p1]
Updated•8 years ago
|
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Updated•8 years ago
|
Status: RESOLVED → VERIFIED
Updated•3 years ago
|
Performance Impact: --- → P1
Whiteboard: [qf:p1]
You need to log in
before you can comment on or make changes to this bug.
Description
•