Script Preparation code:
AخA
 
object = ['data'];
proxy = new Proxy(object, {})
proxyWithHandler = new Proxy(object, {
    get(target, prop, receiver) {
        return Reflect.get(target, prop, receiver)
    }
})
proxyWithHandler2 = new Proxy(object, {
    get(target, prop, receiver) {
        return target[prop]
    }
})
Tests:
  • Array access

     
    object[0];
  • Proxy access

     
    proxy[0]
  • Proxy with reflect handler

     
    proxyWithHandler[0]
  • Proxy with handler

     
    proxyWithHandler2[0]
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Array access
    Proxy access
    Proxy with reflect handler
    Proxy with handler

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: yesterday)
Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
Chrome 126 on Chrome OS 14541.0.0
View result in a separate tab
Test name Executions per second
Array access 59278932.0 Ops/sec
Proxy access 6528805.0 Ops/sec
Proxy with reflect handler 2841743.0 Ops/sec
Proxy with handler 4109225.8 Ops/sec