html_clone

JavaScript performance comparison

Test case created by Aka

Preparation code

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

<ul class="level-3b" id="StartHereB">
          <li class="item-0b"><a href="http://www.notme.com">0</a></li>
          <li class="item-1b"><a href="http://www.notme.com">1</a></li>
          <li class="item-2b"><a href="http://www.findme.com" class="foo">2</a></li>
          <li class="item-3b"><a href="http://www.notme.com">3</a></li>
          <li class="item-4b"><a href="http://www.notme.com">4</a></li>
        </ul>

Preparation code output

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
html
$('#StartHereB').find('.item-4b').append('This is a html title');
pending…
clone
var CloneTiTle = $('#StartHereB').find('.item-4b').clone();
CloneTiTle
.append('This is a cloned Title').insertAfter($('#StartHereB').find('.item-4b'));
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

0 comments

Add a comment