Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.113 Safari/537.36
Chrome 81
Mac OS X 10.15.3
Desktop
4 years ago
Test name Executions per second
text.data 1151966.6 Ops/sec
el.textContent 1667351.4 Ops/sec
text.nodeValue 1249038.2 Ops/sec
el.innerHTML 89363.6 Ops/sec
text.remove/append 242083.0 Ops/sec
text.textContent 1072051.4 Ops/sec
text.replaceData 870346.8 Ops/sec
HTML Preparation code:
Tests:
  • text.data

  • el.textContent

  • text.nodeValue

  • el.innerHTML

  • text.remove/append

  • text.textContent

  • text.replaceData


;