Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Access to Proxy vs Object vs Signal 2.3
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:125.0) Gecko/20100101 Firefox/125.0
Browser:
Firefox 125
Operating system:
Mac OS X 10.15
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Proxy access
290255424.0 Ops/sec
Signal access
150509744.0 Ops/sec
object define properties
1189667584.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; } }); object = { value: 'data' }; proxy = new Proxy(object, {}) proxyWithHandler = new Proxy(object, { get(target, prop, receiver) { return Reflect.get(target, prop, receiver) } })
Tests:
Proxy access
proxy.value
Signal access
sigData().value
object define properties
mObject.value