Test name | Executions per second |
---|---|
Object access | 15516283.0 Ops/sec |
Proxy access | 11602219.0 Ops/sec |
Proxy with get handler access | 6131639.0 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