Which method is faster?
Array Join:
var str_to_split = \"a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z\";
var myarray = str_to
Manual concatenation is faster, for a numeric array of fixed length.
Here's a JSPerf test that tests these two operations:
zxy.join('/')
// versus
zxy[0] + '/' + zxy[1] + '/' + zxy[2]
// given the array
zxy = [1, 2, 3]
// resulting in the string '0/1/2'
Results: Using Chrome 64.0.3282.186, Array.join
was 46% slower.