Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
JS Proxy vs Getter
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0
Browser:
Firefox 128
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one year ago
Raw access
1763.9M/s
Getter
465.9M/s
Function
454.3M/s
Proxy
35.7M/s
View exact numbers
Test name
Executions per second
✓
Raw access
1,763,897,984 Ops/sec
Getter
465,857,408 Ops/sec
Function
454,290,688 Ops/sec
Proxy
35,733,140 Ops/sec
Script Preparation code:
obj = { value: "Value", getData() { return obj.value; }, get data() { return obj.value; } }; proxy = new Proxy({}, { get(_, prop) { if(prop !== "value") return; return obj.value; } });
Tests:
Raw access
obj.value;
Function
obj.getData();
Getter
obj.data;
Proxy
proxy.value;