Recently, I've heard a number of different people lamenting the speed differences in IE versus pretty well every other browser when it comes to using JavaScript to manipulate the DOM.
I thought I'd put together a tiny little script to see what the differences really were, but I think I'm looking at the wrong problem as IE performs as well as or better with the tests I've developed.
Does anyone have some JavaScript laying around that would be good at illustrating the differences in speed of IE versus other browsers, specifically code that manipulates the DOM?
I'd like to test some optimization techniques, but I need a good test case first.
Edit: Sorry, here is my tiny little throwaway script:
var counter = 0; // Global element counter
function addCheckBoxes(){
var container = document.getElementById('container');
var newBox = document.getElementById('check1').cloneNode(true);
newBox.id = '';
container.appendChild(newBox);
}
function addLotsOfBoxes(){
var thistime = new Date();
for(i=0; i < 8000; i++)
{
addCheckBoxes();
}
var thattime = new Date();
var timediff = thattime - thistime;
alert(timediff);
}