Run details:
Mozilla/5.0 (Android 12; Mobile; rv:109.0) Gecko/113.0 Firefox/113.0
Firefox Mobile 113
Android
Mobile
one year ago
Test name Executions per second
Pure JS .innerText 103324.7 Ops/sec
Pure JS .innerHTML 119799.1 Ops/sec
Pure JS .textContent 121739.9 Ops/sec
jQuery .text() 71264.8 Ops/sec
jQuery .html() 76395.7 Ops/sec
jQuery .find().text() 50575.8 Ops/sec
jQuery .find().html() 55409.7 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()