Test name | Executions per second |
---|---|
Object access | 724476160.0 Ops/sec |
Proxy access | 9495483.0 Ops/sec |
Proxy with get handler access | 4004648.8 Ops/sec |
object = { value: 'data' };
proxy = new Proxy(object, {})
proxyWithHandler = new Proxy(object, {
get(target, prop, receiver) {
return Reflect.get(target, prop, receiver)
}
})
object.value;
proxy.value
proxyWithHandler.value