Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.68
Chrome 112
Windows
Desktop
one year ago
Test name Executions per second
querySelector 3127955.8 Ops/sec
innerText 471940.2 Ops/sec
offsetWidth 592542.1 Ops/sec
innerHTML 2088703.8 Ops/sec
outerText 550702.4 Ops/sec
textContent 2153203.8 Ops/sec
textContentTrim 2109044.2 Ops/sec
HTML Preparation code:
Tests:
  • querySelector

  • innerText

  • offsetWidth

  • innerHTML

  • outerText

  • textContent

  • textContentTrim


;