Run details:
Mozilla/5.0 (Linux; Android 10; MI 8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.73 Mobile Safari/537.36
Chrome Mobile 99
Android
Mobile
one year ago
Test name Executions per second
Pure JS .innerText 240029.1 Ops/sec
Pure JS .innerHTML 49218.4 Ops/sec
Pure JS .textContent 838796.8 Ops/sec
jQuery .text() 124126.2 Ops/sec
jQuery .html() 29990.7 Ops/sec
jQuery .find().text() 94960.8 Ops/sec
jQuery .find().html() 24650.9 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()