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