create dom element

Benchmark created by form 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
$('<form action="' + options.action + '"></form>');
ready
var $form
     var $form = $('<form></form>');
     $form.attr('action',options.action); 
 
ready
chain
$('<form></form>').attr('action',options.action)
ready
native mix
$(document.createElement("form")).attr('action',options.action)
ready
native
var form = document.createElement("form"),
    $form = $(form);
form.action = options.action;
ready
another query
$('<form>', {action: options.action})
ready

Revisions

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