Run details:
Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4936.0 Safari/537.36
Chrome 101
Windows 8.1
Desktop
2 years ago
Test name Executions per second
querySelector 3012644.2 Ops/sec
innerText 522223.7 Ops/sec
offsetWidth 348619.2 Ops/sec
innerHTML 1859771.2 Ops/sec
outerText 401835.7 Ops/sec
textContent 1905365.8 Ops/sec
textContentTrim 1847442.6 Ops/sec
HTML Preparation code:
Tests:
  • querySelector

  • innerText

  • offsetWidth

  • innerHTML

  • outerText

  • textContent

  • textContentTrim


;