Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Add new element to array: push vs destructuring with Set
spread operator vs Push
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Android 13; Mobile; rv:122.0) Gecko/122.0 Firefox/122.0
Browser:
Firefox Mobile 122
Operating system:
Android
Device Platform:
Mobile
Date tested:
2 years ago
push
850K/s
spread operator
757K/s
View exact numbers
Test name
Executions per second
✓
push
849,993 Ops/sec
spread operator
757,006 Ops/sec
Tests:
spread operator
var params = [ "hello", true, 7, 'new' ] var other = [...new Set([ ...params, 'new' ])]
push
var params = [ "hello", true, 7, 'new' ] params.push('new') var other = [...new Set(params)]