Test

Benchmark created on


Preparation HTML

<div id="output"></div>

Setup

document.getElementById('#output').innerHTML = '';

Test runner

Ready to run.

Testing in
TestOps/sec
Append loop
const output = document.getElementById('#output');
for(i = 0; i < 1000; i++){    
        const item = document.createElement('div');        
        output.appendChild(item);
}
ready
Document fragement
const output = document.getElementById('#output');
const frag = document.createDocumentFragment();
for(i = 0; i < 1000; i++){    
        const item = document.createElement('div');        
        frag.appendChild(item);
}
output.appendChild(frag);
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.