For what I want to accomplish, I can use either createElement() or innerHTML and a string.
Which is truly faster in the end? I've been led to believe for a long time that strings are much slower than built-in functions that return the same results, but is it really true?
I ask because I've tried createElement() and it seems that all of the properties that have to be added to each element slows things down. Not only that, but it takes up more space, too. I have a loop that goes anywhere from 1-infinity based on an array's length, though preferably adding up to 50 or so elements before showing signs of slowing down. Within these 50 or so elements that I wish to create are about 10 more elements. So, in all, it's actually creating around 500 elements.
I noticed a bit of a slowdown faster than usual by creating elements with the built-in functions, and due to my fooling around resetting that array (the array was 5D and not set in the same script), I'd like to know which is truly better, both as far as speed goes and simply the better practice, before doing it all over.
innerHTML, and for major changes (adding many links or components to a single container, or any structure that is more than 2 nodes deep) usecreateElement().