Avoiding .innerHTML slowdowns

You might already have figured out that .innerHTML can be way faster than using the DOM. But did you know that when clearing out existing code the DOM can be faster than .innerHTML? Take a look the article When innerHTML isn’t fast enough to see some impressive benchmarks and a simple solution.