create dom element (v7)

Revision 7 of this benchmark created on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

Setup

var options = {action: "path"};

Teardown


    options = null;
  

Test runner

Ready to run.

Testing in
TestOps/sec
one liner
$('<div>blah</div>');
ready
var $form
     var $form = $('<div></div>');
     $form.html('blah'); 
ready
chain
$('<div></div>').html('blah')
ready
native mix
$(document.createElement("div")).html('blah')
ready
native
var form = document.createElement("div"),
    $form = $(form);
form.textContent = 'blah';
ready
another query
$('<div>', {action: options.action})
ready

Revisions

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