Test name | Executions per second |
---|---|
Object access | 5264954.5 Ops/sec |
Proxy access | 4142657.5 Ops/sec |
Proxy with get handler access | 2024060.8 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