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 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
Browser:
Chrome 126
Operating system:
Chrome OS 14541.0.0
Device Platform:
Desktop
Date tested:
one year ago
Array access
59.3M/s
Proxy access
6.5M/s
Proxy with handler
4.1M/s
Proxy with reflect handler
2.8M/s
View exact numbers
Test name
Executions per second
✓
Array access
59,278,932 Ops/sec
Proxy access
6,528,805 Ops/sec
Proxy with handler
4,109,226 Ops/sec
Proxy with reflect handler
2,841,743 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]