Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
array different method of inserting single element test
(version: 0)
Comparing performance of:
push vs concat vs spread
Created:
one year ago
by:
Guest
Jump to the latest result
Script Preparation code:
window.ptest = Array.from(new Array(10000)).map((_,i) => i); window.ctest = Array.from(new Array(10000)).map((_,i) => i); window.stest = Array.from(new Array(10000)).map((_,i) => i);
Tests:
push
window.ptest = window.ptest.push(10000)
concat
window.ctest = window.ctest.concat(10000)
spread
window.stest = [...window.stest, 10000]
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
push
concat
spread
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?