find and children

JavaScript performance comparison

Revision 3 of this test case created

Preparation code

< !document > < html > < head > <script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>< /head>
<body>
<div class="a">
<b class="b">999<i class="c">000</i > < /b>
<b class="bb">1111</b > < b class = "bbb" > 222 < /b>
</div > < /body>
</html >

Preparation code output

< !document > < html > < head > < /head>
999000 < /b> 1111 < b class = "bbb" > 222 < /b>
< /body>

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
find
(function() {
  $('.a').find('.b').css('color', '#f00');
})();
pending…
children
(function() {
  $('.a').children().css('color', '#f00');
})();
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