Test | Ops/sec | |
---|---|---|
Object.defineProperty
|
|
ready |
__defineGetter__
|
for (var i = 0; i < 1000; i++) { |
ready |
Normal
|
for (var i = 0; i < 1000; i++) { |
ready |
Prototype
|
for (var i = 0; i < 1000; i++) { |
ready |
Setter
|
for (var i = 0; i < 1000; i++) { |
ready |
defineProperty with local funcs
|
for (var i = 0; i < 1000; i++) { |
ready |
http://jsperf.com/object-defineproperty-vs-definegetter-vs-normal/49jsp