vanillajs-by-tag

JavaScript performance comparison

Revision 25 of this test case created by Nathan

Preparation code

<script src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
<script src="https://zeptojs.com/zepto.min.js"></script>
<script src="https://code.fireboltjs.com/firebolt.min.js"></script>
<script>
var tags = ['span', 'div', 'section', 'article'];
var nTags = tags.length;
</script>
    

Preparation code output

<script src="https://zeptojs.com/zepto.min.js"></script> <script src="https://code.fireboltjs.com/firebolt.min.js"></script> <script> var tags = ['span', 'div', 'section', 'article']; var nTags = tags.length; </script>

Test runner

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

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
1 - Vanilla JS
for (var i = 0; i < nTags; i++) {
  document.getElementsByTagName(tags[i]);
}
pending…
2 - Firebolt
for (var i = 0; i < nTags; i++) {
  $TAG(tags[i]);
}
pending…
3 - jQuery
for (var i = 0; i < nTags; i++) {
  jQuery(tags[i]);
}
pending…
4 - Zepto
for (var i = 0; i < nTags; i++) {
  Zepto(tags[i]);
}
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.

0 Comments