Organizational Research By

Surprising Reserch Topic

Experts Most Trusted Topic


why is string concatenation faster than array join


why is string concatenation faster than array join  using -'javascript,performance,string-concatenation'

Today, I read this thread about speed of string concatenation.

Surprisingly, string concatenation was the winner:


  http://jsperf.com/array-join-vs-string-connect
  
  http://jsperf.com/join-concat/2


The result was opposite from what I thought. Besides, there are many articles about this which explains oppositely like this or this.

I can guess that browsers are optimized to string concat on latest version, but how do they do that? Can we say that it is better to use + when concatenating strings?
    

asked Oct 13, 2015 by girisha
0 votes
2 views



Related Hot Questions



Government Jobs Opening


...