Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
unshift, splice, concat, spread v2.
(version: 0)
Comparing performance of:
unshift vs splice vs spread vs concat
Created:
3 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
var arr = Array.from(Array(1000).keys()); var int = 0;
Tests:
unshift
arr.unshift(int);
splice
arr.splice(0, 0, int)
spread
var newarr = [int, ...arr];
concat
var newarr = [int].concat(arr);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (4)
Previous results
Fork
Test case name
Result
unshift
splice
spread
concat
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:
Splice vs Spread vs Unshift to insert at beginning of array (fixed from slice)
Array merge (spread, concat)
unshift, splice, concat, spread
Splice vs Spread vs Unshift vs Concat to insert at beginning of array (fixed from slice)
Comments
Confirm delete:
Do you really want to delete benchmark?