Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Array concat vs spread operator vs push (without spread)
(version: 0)
Comparing performance of:
Array.prototype.concat vs Spread Operator vs Array.prototype.push
Created:
5 years ago
by:
Guest
Jump to the latest result
Tests:
Array.prototype.concat
var a1 = [1,2,3,4]; var a2 = a1.concat('bar');
Spread Operator
var a1 = [1,2,3,4]; var a2 = [...a1, 'bar'];
Array.prototype.push
var a1 = [1,2,3,4]; var a2 = a1.push('bar');
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
Array.prototype.concat
Spread Operator
Array.prototype.push
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
Array concat vs spread operator vs push with more data
Array concat vs spread operator vs push larger list
Array.prototype.concat vs spread operator vs push with spread
Array concat vs spread operator vs push + spread 2023-08-21
Array concat vs spread operator vs push with short arrays
Comments
Confirm delete:
Do you really want to delete benchmark?