document fragment perf

Benchmark created by Avenger7x on


Test runner

Ready to run.

Testing in
TestOps/sec
without
var block, i;
for (i = 0; i < 2; i++) {
  block = document.createElement('p');
  block.id = 'element' + i;
  document.body.appendChild(block);
}
ready
with
var block, i, fragment = document.createDocumentFragment();
for (i = 0; i < 2; i++) {
  block = document.createElement('p');
  block.id = 'element' + i;
  fragment.appendChild(block);
}
document.body.appendChild(fragment);
ready

Revisions

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

  • Revision 1: published by Avenger7x on