Vanilla JS innerHTML vs Quo.js html() vs jQuery 2.1.1 html() vs domstatic html() (v3)

Revision 3 of this benchmark created by Martín Acosta on


Preparation HTML

<div id="js-element">initial content</div>

<script src="https://cdnjs.cloudflare.com/ajax/libs/quo.js/2.3.6/quo.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script>
var $jq = jQuery.noConflict();
</script>

<script src="https://cdn.jsdelivr.net/domtastic/0.7/domtastic.min.js"></script>

Setup

var element = document.getElementById('js-element');

Test runner

Ready to run.

Testing in
TestOps/sec
innerHTML
element.innerHTML = 'new content';
ready
Quo.js html()
$$(element).html('new content');
ready
jQuery 2.1.1 html()
$jq(element).html('new content');
ready
domstatic html()
$(element).html('new content');
ready

Revisions

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

  • Revision 1: published by André Ruffert on
  • Revision 3: published by Martín Acosta on
  • Revision 4: published on
  • Revision 5: published by Ben on
  • Revision 6: published by Andrew on
  • Revision 7: published by Andrew on