Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
list push vs splice into the end of array
(version: 0)
Comparing performance of:
append vs splice vs concat
Created:
4 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
l = 123;
Tests:
append
a = Array(l); a.push(1, 2, 3, 4, 5, 6);
splice
a = Array(l); a.splice(l,0,1,2,3,4,5,6);
concat
a = Array(l); a = a.concat([1,2,3,4,5,6]);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
append
splice
concat
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36
Browser/OS:
Chrome 134 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
append
4628954.5 Ops/sec
splice
3188326.0 Ops/sec
concat
2963192.0 Ops/sec
Related benchmarks:
Subarray - Splice vs Slice
Slice vs splice forked
Using Splice vs Spread vs Unshift to insert at beginning of array
slice VS splice 1234567
Comments
Confirm delete:
Do you really want to delete benchmark?