BSI.tag() vs jQuery() vs DOM for #li > li

JavaScript performance comparison

Revision 7 of this test case created

Info

Testing performance of DOM child selector methods. CSS queries are not used - at least not explicitly. Internal workings of the frameworks tested MAY use them internally.

Preparation code

<script src="//code.jquery.com/jquery-latest.min.js"></script>
<script src="http://bytes1.dyndns.org/BSI/website-app.js"></script>
<ul id="list">
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
  <li>Placeholder text</li>
</ul>

Preparation code output

  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text
  • Placeholder text

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
Native DOM
document.getElementById('list').getElementsByTagName('li');
pending…
Native DOM w/ children
document.getElementById('list').children
pending…
$().get().getElementsByTagName()
$('#list').get(0).getElementsByTagName('li');
pending…
BSI.id().Node.getElementsByTagName()
BSI.id('list').Node.getElementsByTagName('li');
pending…
$().children() w/ filter
$('#list').children('li');
pending…
$().children() w/out filter
$('#list').children();
pending…
$().find()
$('#list').find('li');
pending…
$() w/ context
$('li', '#list');
pending…
BSI.tag()
BSI.tag('li', 'list');
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