Web performance is pretty complicated, take a look at this variant: http://jsperf.com/innerhtml-vs-removechild/128