Read text (v10)

Revision 10 of this benchmark created by Mayhem on


Preparation HTML

<div id="text">content to be retrieved</div>
<script>
  var elem = document.getElementById("text");
  var x;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
innerHTML
x = elem.innerHTML;
ready
textContent
x = elem.textContent;
ready
data
x = elem.firstChild.data;
ready
nodeValue
x = elem.firstChild.nodeValue;
ready
innerText
x = elem.innerText;
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.

  • Revision 1: published by galambalazs on
  • Revision 2: published by galambalazs on
  • Revision 3: published by galambalazs on
  • Revision 9: published by aeosynth on
  • Revision 10: published by Mayhem on
  • Revision 11: published on