Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
concat two arrays: push vs destructuring
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.1.1 Safari/605.1.15
Browser:
Safari 18
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
spread operator
550880384.0 Ops/sec
Push
25623944.0 Ops/sec
concatenation
50143944.0 Ops/sec
Tests:
spread operator
var params = [ "hello", true, 7 ] var other = [ ...params, ...["new", false, 3] ]
Push
var params = [ "hello", true, 7 ]; params.push(...["new", false, 3]);
concatenation
var params = [ "hello", true, 7 ]; var another = ["new", false, 3]; params.concat(another);