HTML Preparation code:
Tests:
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    With createElement() and append()
    With createElement() and appendChild()
    With innerHTML and getElementById()
    With innerHTML and getElementsByClassName()
    With innerHTML and getElementsByTagName()
    With innerHTML and querySelector()
    With innerHTML and querySelectorAll()
    With createElement() and outerHTML
    With innerHTML and children[children.length - 1]
    With innerHTML and lastChild
    With innerHTML and lastElementChild
    With createElement() and innerHTML

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (X11; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0
Firefox 130 on Linux
View result in a separate tab
With innerHTML and getElementById()
81K/s
With innerHTML and lastChild
80K/s
With innerHTML and lastElementChild
78K/s
With innerHTML and getElementsByTagName()
77K/s
With innerHTML and querySelector()
77K/s
With innerHTML and getElementsByClassName()
74K/s
With innerHTML and children[children.length - 1]
70K/s
With innerHTML and querySelectorAll()
68K/s
With createElement() and innerHTML
68K/s
With createElement() and outerHTML
67K/s
With createElement() and append()
1K/s
With createElement() and appendChild()
559/s
View exact numbers
Test name Executions per second
With innerHTML and getElementById() 80,814 Ops/sec
With innerHTML and lastChild 80,355 Ops/sec
With innerHTML and lastElementChild 77,864 Ops/sec
With innerHTML and getElementsByTagName() 77,459 Ops/sec
With innerHTML and querySelector() 77,210 Ops/sec
With innerHTML and getElementsByClassName() 74,097 Ops/sec
With innerHTML and children[children.length - 1] 69,530 Ops/sec
With innerHTML and querySelectorAll() 68,396 Ops/sec
With createElement() and innerHTML 68,205 Ops/sec
With createElement() and outerHTML 66,977 Ops/sec
With createElement() and append() 1,275 Ops/sec
With createElement() and appendChild() 559 Ops/sec