Run details:
Mozilla/5.0 (Linux; Android 7.0; EVA-L09 Build/HUAWEIEVA-L09) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.109 Mobile Safari/537.36
Chrome Mobile 65
Android 7.0
EVA-L09
2024 years ago
Test name Executions per second
Pure JS .innerText 525323.7 Ops/sec
Pure JS .innerHTML 70973.4 Ops/sec
Pure JS .textContent 1130935.0 Ops/sec
jQuery .text() 70979.9 Ops/sec
jQuery .html() 27974.2 Ops/sec
jQuery .find().text() 43406.8 Ops/sec
jQuery .find().html() 31541.5 Ops/sec
HTML Preparation code:
Tests:
  • Vanilla JS .innerText

  • Vanilla JS .innerHTML

  • Vanilla JS .textContent

  • Vanilla JS (QuerySelector) .innerText

  • Vanilla JS (QuerySelector) .innerHTML

  • Vanilla JS (QuerySelector) .textContent

  • Vanilla JS (QuerySelectorAll) .innerText

  • Vanilla JS (QuerySelectorAll) .innerHTML

  • Vanilla JS (QuerySelectorAll) .textContent

  • Cash .text

  • Cash .html

  • jQuery .text()

  • jQuery .html()

  • jQuery .find() .text()

  • jQuery .find() .html()