Run details:
Mozilla/5.0 (Linux; Android 13; SM-F721B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36
Chrome Mobile 111
Android
Mobile
one year ago
Test name Executions per second
Pure JS .innerText 675832.5 Ops/sec
Pure JS .innerHTML 90917.7 Ops/sec
Pure JS .textContent 1708353.4 Ops/sec
jQuery .text() 298035.4 Ops/sec
jQuery .html() 61314.2 Ops/sec
jQuery .find().text() 217935.1 Ops/sec
jQuery .find().html() 64039.1 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()


;