HTML Preparation code:
Tests:
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: 2 years 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
Pure JS .textContent
4.0M/s
Pure JS .innerText
1.9M/s
Pure JS .innerHTML
1.2M/s
jQuery .text()
795K/s
jQuery .find().text()
579K/s
jQuery .html()
568K/s
jQuery .find().html()
448K/s
View exact numbers
Test name Executions per second
Pure JS .textContent 4,018,680 Ops/sec
Pure JS .innerText 1,874,591 Ops/sec
Pure JS .innerHTML 1,155,153 Ops/sec
jQuery .text() 794,512 Ops/sec
jQuery .find().text() 578,877 Ops/sec
jQuery .html() 568,171 Ops/sec
jQuery .find().html() 448,310 Ops/sec