Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
cost of adding new properties to object after creation.
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.0
Browser:
Firefox 138
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
object literal
730089856.0 Ops/sec
adding properties
21080048.0 Ops/sec
Script Preparation code:
function objLiteral() { const obj = { _chanPutMsg_m: undefined, _doneVal_m: 3213, _name: true, _args: false, _state: "RUNNING", _doneCh: undefined, _childS: undefined, _sleepTimeout_m: undefined, _onCancel_m: undefined, _cancelCh: undefined, } return obj } function addProps() { const obj2 = {} obj2._chanPutMsg_m = undefined obj2._doneVal_m = 3213 obj2._name = true obj2._args = false obj2._state = "RUNNING" obj2._doneCh = undefined obj2._childS = undefined obj2._sleepTimeout_m = undefined obj2._onCancel_m = undefined obj2._cancelCh = undefined return obj2 }
Tests:
object literal
objLiteral()
adding properties
addProps()