Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Access to Proxy vs Array
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36
Browser:
Chrome 134
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Array access
142.2M/s
Proxy access
21.9M/s
Proxy with handler
14.8M/s
Proxy with reflect handler
11.3M/s
View exact numbers
Test name
Executions per second
✓
Array access
142,150,224 Ops/sec
Proxy access
21,883,988 Ops/sec
Proxy with handler
14,762,487 Ops/sec
Proxy with reflect handler
11,343,484 Ops/sec
Script Preparation code:
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]