put-selector vs jquery.html vs dojo.html (v3)

Revision 3 of this benchmark created on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="http://kzyp.dojotoolkit.org/packages/put-selector/put.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/dojo/1/dojo/dojo.xd.js"></script>
<script>
  var target = document.createElement("div"); // as same code for target for consistency
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
put-selector simple element
var newElement = put(target, "div.foo");
ready
jQuery.html insert
var newElement = jQuery(target).html('<div class="foo"></div>')[0].firstChild;
 
ready
dojo.place insert
var newElement = dojo.place('<div class="foo"></div>', target);
 
ready
dojo.create
var newElement = dojo.create('div', {class:'foo'}, target);
 
ready

Revisions

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