Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Teste array concat
(version: 0)
Testando perfoamnce de array concat e push
Comparing performance of:
Push vs Concat
Created:
9 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
var num1 = [1, 2, 3]; var num2 = [4, 5, 6]; var num3 = [7, 8, 9];
Tests:
Push
num4 = []; for (var i=0; i<num1.length; i++) { num4.push('#card_product_' + num1[i]); }; console.log(num4.join(","));
Concat
num4 = ""; for (var i=0; i<num1.length; i++) { num4 +='#card_product_' + num1[i]; }; console.log(num4);
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!
Related benchmarks:
Teste array concat
Teste array concat
Add value in the first position ofan array
Teste array concat push for loop
Array Pushing2
Comments
Confirm delete:
Do you really want to delete benchmark?