Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Access to Proxy vs Object vs Signal 2.1ffkikyy
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Mobile Safari/537.36
Browser:
Chrome Mobile 135
Operating system:
Android
Device Platform:
Mobile
Date tested:
one year ago
Test name
Executions per second
proxyReflect access
23597108.0 Ops/sec
Signal access
104605544.0 Ops/sec
object define properties
106094960.0 Ops/sec
proxy get
30699996.0 Ops/sec
Script Preparation code:
class Signal { constructor(state) { this.value = state; } get() { return this.value; } set(newValue) { if (newValue !== this.value) { this.value = newValue; } } } function createSignal(value) { const v = new Signal(value); return [v.get.bind(v), v.set.bind(v)]; } var [sigData, setData] = createSignal({ value: 'data' }); var mObject = { _value: 'data' }; Object.defineProperty(mObject, 'value', { set: function(nv) { this._value = nv; }, get: function() { return this._value; } }); var proxyReflect = new Proxy({ value: 'data' }, { get(target, prop, receiver) { return Reflect.get(target, prop, receiver) } }) var proxyGet = new Proxy({ value: 'data' }, { get(target, prop, receiver) { return target.value } })
Tests:
proxyReflect access
proxyReflect.value
Signal access
sigData().value
object define properties
mObject.value
proxy get
proxyGet.value