jQuery Create Element (v12)

Revision 12 of this benchmark created on


Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<div id="target" />

Teardown



            $('#target').html('');
        
  

Test runner

Ready to run.

Testing in
TestOps/sec
document.createElement
var e = $(document.body).append("<div>Hello</div>")
ready
div
var e = $('<div>').appendTo('#target');
ready
div with a closing tag
var e = $('<div></div>').appendTo('#target');
ready
self closing div
var e = $('<div/>').appendTo('#target');
ready

Revisions

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