Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36
Chrome 127
Windows
Desktop
5 months ago
Test name Executions per second
Object access 16399018.0 Ops/sec
Proxy access 14758347.0 Ops/sec
Proxy with get handler access 6505394.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