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