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