Re: oldNode.replaceWith(...collection) edge case

On 1/21/15 3:52 AM, Simon Pieters wrote:
> This jsperf might be interesting:
>
> http://jsperf.com/appendchild-vs-documentfragment-vs-innerhtml/81

Or misleading.

Again, in real life what matters most here is what else is on the page, 
which the jsperf doesn't capture.  The other thing that really matters 
is how many elements are being inserted, exactly, of course... which the 
jsperf also doesn't capture.

Typically, jsperf is the wrong tool for answering questions like this, 
unless you're 100% sure your microbenchmark captures all the essential 
features of the macro-situation...

-Boris

Received on Wednesday, 21 January 2015 12:22:18 UTC