Test name | Executions per second |
---|---|
Object access | 16382232.0 Ops/sec |
Proxy access | 11097213.0 Ops/sec |
Proxy with get handler access | 5096788.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