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)
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    DOM
    DomFragment
    hybrid

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 years ago)
Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0
Firefox 95 on Linux
View result in a separate tab
Test name Executions per second
DOM 260839.2 Ops/sec
DomFragment 4818.3 Ops/sec
hybrid 2662.1 Ops/sec