jQuery Create Element (v4)

Revision 4 of this benchmark created on


Preparation HTML

<script src="https://code.jquery.com/jquery-git2.js"></script>
<div id="target" />

Teardown



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

Test runner

Ready to run.

Testing in
TestOps/sec
document.createElement
var e = $(document.createElement('div')).appendTo('#target');
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.