Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
append test
(version: 0)
Comparing performance of:
concat vs push spread vs prototype push apply vs push for loop
Created:
one year ago
by:
Guest
Jump to the latest result
Script Preparation code:
var a = Array.from({ length: 100 }, (_, k) => k) var b = Array.from({ length: 100 }, (_, k) => k)
Tests:
concat
a.concat(b) return a
push spread
a.push(...b) return a
prototype push apply
var c = Array.prototype.push.apply(a, b) return c
push for loop
for (let i = 0; i < b.length; ++i) { a.push(b[i]) } return a
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (4)
Previous results
Fork
Test case name
Result
concat
push spread
prototype push apply
push for loop
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?