createComplexElement (v3)

Revision 3 of this benchmark created on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<div id=container style="display: none" ></div>
<script>
$div = $('#container')
</script>

Teardown


    $div.empty()
  

Test runner

Ready to run.

Testing in
TestOps/sec
one string
$div.append('<span id="hi" class="blahblah orz" style="display: inline-block">Hello</span>');
ready
adjusting
$('<span ></span>').attr({
    id: "hi",
    "class": "blahblah orz"
}).css('display', 'inline-block')
    .text('Hello').appendTo($div);
ready
insertAdjacentHTML
$div[0].insertAdjacentHTML('beforeend', '<span id="hi" class="blahblah orz" style="display: inline-block">Hello</span>')
ready

Revisions

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