I\'ve got a doubt regarding performance in JS.
Say, I\'ve got the next code:
var divContainer = document.createElement(\"div\"); divContainer.id=\"co
The jsperf from wolfram77 contains an additional for loop in the non fragment example which is the main cause for the performance difference, not the DocumentFragment. By removing this additional for loop you can achieve the same result but the performance is completely different:
Example on jsperf.com
So I still don't see a performance benefit on the scripting part but there might be one in the browser when it has to repaint for each appended element.