Run details:
Mozilla/5.0 (Linux; Android 11; M2012K11I) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Mobile Safari/537.36
Chrome Mobile 94
Android
Mobile
2 years ago
Test name Executions per second
Object access 6653807.5 Ops/sec
Proxy access 4747771.0 Ops/sec
Proxy with get handler access 2215081.0 Ops/sec
Script Preparation code:
AخA
 
object = { value: 'data' };
proxy = new Proxy(object, {})
proxyWithHandler = new Proxy(object, {
    get(target, prop, receiver) {
        return Reflect.get(target, prop, receiver)
    }
})
Tests:
  • Object access

     
    object.value;
  • Proxy access

     
    proxy.value
  • Proxy with get handler access

     
    proxyWithHandler.value