Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
Object spread operator vs property assignment
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36
Browser:
Chrome 132
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Benchmark engine:
Benchmark.js
Property assignment
220.1M/s
Spread operator
86.1M/s
View exact numbers
Test name
Executions per second
✓
Property assignment
220,067,696 Ops/sec
Spread operator
86,145,904 Ops/sec
Tests:
Spread operator
const obj = { a: 1, b: 'two', c: true }; const objExt = { ...obj, b: 2 };
Property assignment
const obj = { a: 1, b: 'two', c: true }; obj.b = 2;