jQuery vs createElement for complex additions (v124)

Revision 124 of this benchmark created by Ed Wilde on


Description

Do the standard results change for more complex additions?

Preparation HTML

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

Test runner

Ready to run.

Testing in
TestOps/sec
$('<div>').html()
$('<div class="blah" id="1"></div>').html('hello');
ready
$('<div>html</div>')
$('<div class="blah" id="1">hello</div>');
ready
document.createElement
$(document.createElement('div')).addClass('blah').attr('id','1').html('hello');
ready

Revisions

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