jQuery element creation (v32)

Revision 32 of this benchmark created on


Preparation HTML

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

Test runner

Ready to run.

Testing in
TestOps/sec
With trailing slash
$('<div/>').appendTo("#test");
ready
Without trailing slash
$('<div>').appendTo("#test");
ready
Opening and closing tags
$('<div></div>').appendTo("#test");
ready
document.createElement
$(document.createElement('div')).appendTo("#test");
ready
JQuery.html()
$("#test").html("<div></div>");
 
ready

Revisions

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