Creating complex elements (v12)

Revision 12 of this benchmark created on


Preparation HTML

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

Setup

var clone = $("<div>").append( $("<table>").append('<tr>').append('<td>') );

Test runner

Ready to run.

Testing in
TestOps/sec
Using $().append()...
$("<div>").append( $("<table>").append('<tr>').append('<td>') );
ready
Using $(html)
$("<div><table><tr><td></td><td></td></tr></table></div>");
ready
Cloning
clone.clone()
ready

Revisions

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