Test name | Executions per second |
---|---|
Object access | 16914558.0 Ops/sec |
Proxy access | 11178459.0 Ops/sec |
Proxy with get handler access | 7521927.5 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