HTML Preparation code:
Tests:
  • appendChild after createElement

  • appendChild after getElementById

  • appendChild after createElement (with cloneNode)

  • appendChild after getElementById (with cloneNode)

  • appendChild to fragment, then append after createElement

  • appendChild to fragment, then append after getElementById

  • appendChild to fragment, then append after createElement (with cloneNode)

  • appendChild to fragment, then append after getElementById (with cloneNode)

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    appendChild after createElement
    appendChild after getElementById
    appendChild after createElement (with cloneNode)
    appendChild after getElementById (with cloneNode)
    appendChild to fragment, then append after createElement
    appendChild to fragment, then append after getElementById
    appendChild to fragment, then append after createElement (with cloneNode)
    appendChild to fragment, then append after getElementById (with cloneNode)

    Fastest: N/A

    Slowest: N/A

Get performance results from real users on your website with Request Metrics.
Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Firefox/91.0
Firefox 91 on Mac OS X 10.15
View result in a separate tab
Test name Executions per second
appendChild after createElement 1174.9 Ops/sec
appendChild after getElementById 912.6 Ops/sec
appendChild after createElement (with cloneNode) 1791.3 Ops/sec
appendChild after getElementById (with cloneNode) 1996.0 Ops/sec