Test name | Executions per second |
---|---|
Object setter | 5835338.0 Ops/sec |
Proxy setter | 1899049.1 Ops/sec |
Proxy with set handler | 2012063.1 Ops/sec |
object = {};
proxy = new Proxy(object, {})
proxyWithHandler = new Proxy(object, {
set(target, prop, receiver) {
return Reflect.set(target, prop, receiver)
}
})
object.value = 'data';
proxy.value = 'data';
proxyWithHandler.value = 'data';