Simple jQuery & ExtCore Comparisson

JavaScript performance comparison

Revision 2 of this test case created by Bagus

Info

Im big fan of jQuery. I love them, but i need performance. Here is test of some basic operation that often used.

Now, what im thinking?

Preparation code

<div id="select_me" class="select_me">who fast enough in selecting this div?</div>

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/ext-core/3.1.0/ext-core.js"></script>

Preparation code output

who fast enough in selecting this div?

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
Javascript (by id)
var js1 = document.getElementById("select_me");
pending…
Javascript (by class)
var js2 = document.getElementsByClassName("select_me");
pending…
Javascript (by tag)
var js3 = document.getElementsByTagName("div");
pending…
jQuery 2.0.0 (by id)
var jq1 = $("#select_me");
pending…
jQuery 2.0.0 (by class)
var jq2 = $(".select_me");
pending…
jQuery 2.0.0 (by tag)
var jq3 = $("div");
pending…
ExtCore 3.1.0 (by id)
ext1 = Ext.get("#select_me");
pending…
ExtCore 3.1.0 (by class)
ext2 = Ext.get(".select_me");
pending…
ExtCore 3.1.0 (by tag)
ext3 = Ext.get("div");
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