Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36
Chrome 79
Mac OS X 10.14.4
Desktop
5 years ago
Test name Executions per second
DOM 52224.2 Ops/sec
DomFragment 3713.3 Ops/sec
hybrid 749.1 Ops/sec
Tests:
  • DOM

    AخA
     
    const test = document.createElement('div')
    test.innerHTML = '<div>foo bar</div>'
    document.body.append(...test.childNodes)
  • DomFragment

     
    const test = document.createRange().createContextualFragment('<div>foo bar</div>')
    document.body.append(test)
  • hybrid

    x
     
    const test1 = document.createElement('div')
    const test2 = document.createRange().createContextualFragment('<div>foo bar</div>')
    test1.append(test2)
    document.body.append(...test1.childNodes)