HTML Preparation code:
Tests:
  • Node.appendChild(el) in loop

  • Element.append(...els)

  • Node.appendChild(DocumentFragment) (DocumentFragment.appendChild(el) in loop)

  • Node.appendChild(DocumentFragment) (DocumentFragment.append(...els))

  • innerHTML

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Node.appendChild(el) in loop
    Element.append(...els)
    Node.appendChild(DocumentFragment) (DocumentFragment.appendChild(el) in loop)
    Node.appendChild(DocumentFragment) (DocumentFragment.append(...els))
    innerHTML

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 21 days ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.4 Safari/605.1.15
Safari 26 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
Node.appendChild(el) in loop 23371.9 Ops/sec
Element.append(...els) 28649.7 Ops/sec
Node.appendChild(DocumentFragment) (DocumentFragment.appendChild(el) in loop) 26106.8 Ops/sec
Node.appendChild(DocumentFragment) (DocumentFragment.append(...els)) 24776.7 Ops/sec
innerHTML 43041.6 Ops/sec