Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
concat vs push for big arrays
(version: 0)
Comparing Array.prototype.push and Array.prototype.push for big arrays (adding 100k elements to existing array)
Comparing performance of:
push vs concat
Created:
one year ago
by:
Registered User
Jump to the latest result
Script Preparation code:
window.array = Array.from({ length: 100000 }, (_, i) => i); window.toAppend = Array.from({ length: 10000 }, (_, i) => i);
Tests:
push
array.push(...toAppend)
concat
array = array.concat(toAppend)
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
push
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!
Comments
Confirm delete:
Do you really want to delete benchmark?