HTML Preparation code:
Tests:
  • Pure JS .innerText

  • Pure JS .innerHTML

  • Pure JS .textContent

  • jQuery .text()

  • jQuery .html()

  • jQuery .find().text()

  • jQuery .find().html()

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Pure JS .innerText
    Pure JS .innerHTML
    Pure JS .textContent
    jQuery .text()
    jQuery .html()
    jQuery .find().text()
    jQuery .find().html()

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 8 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 Edg/123.0.0.0
Chrome 123 on Windows
View result in a separate tab
Test name Executions per second
Pure JS .innerText 1874591.4 Ops/sec
Pure JS .innerHTML 1155152.9 Ops/sec
Pure JS .textContent 4018680.0 Ops/sec
jQuery .text() 794512.2 Ops/sec
jQuery .html() 568170.6 Ops/sec
jQuery .find().text() 578876.8 Ops/sec
jQuery .find().html() 448309.6 Ops/sec