Run details:
Mozilla/5.0 (Linux; Android 12; 2107113SG) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.5249.126 Mobile Safari/537.36 OPR/72.5.3767.69342
Opera Mobile 72
Android
Mobile
one year ago
Test name Executions per second
Pure JS .innerText 397835.4 Ops/sec
Pure JS .innerHTML 111014.5 Ops/sec
Pure JS .textContent 1379499.8 Ops/sec
jQuery .text() 190876.4 Ops/sec
jQuery .html() 47925.9 Ops/sec
jQuery .find().text() 138204.3 Ops/sec
jQuery .find().html() 36498.8 Ops/sec
HTML Preparation code:
Tests:
  • Pure JS .innerText

  • Pure JS .innerHTML

  • Pure JS .textContent

  • jQuery .text()

  • jQuery .html()

  • jQuery .find().text()

  • jQuery .find().html()


;