Test name | Executions per second |
---|---|
Object access | 16399018.0 Ops/sec |
Proxy access | 14758347.0 Ops/sec |
Proxy with get handler access | 6505394.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