Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
ES6 Proxy vs JS Object get/set vs get/set Function
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36
Browser:
Chrome 132
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Object read/write
66050972.0 Ops/sec
Proxy read/write
2075251.1 Ops/sec
get/set function
64830928.0 Ops/sec
Script Preparation code:
var object = { value: 'foo' }; var proxy = new Proxy(object, { get(target, prop) { return target[prop]; }, set(target, prop, value) { target[prop] = value; } }); function getData(prop) { return object[prop]; } function setData(prop, val) { object[prop] = val; }
Tests:
Object read/write
const val = object.value; object.value = 'bar';
Proxy read/write
const val = proxy.value; proxy.value = 'bar';
get/set function
const val = getData('value'); setData('value', 'bar');