jQuery text() vs. html() (v30)

Revision 30 of this benchmark created on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<p id="text">
Test text
</p>
<script>
  var textField = $("#text");
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
text()
textField.text("testing jquery __text__ vs html");
ready
html()
textField.html("testing jquery text vs __html__");
ready

Revisions

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