homo

JavaScript performance comparison

Revision 4 of this test case created by dfgsdfgsdfgsdf

Preparation code

<body>
        <button id="addGroup">Add Group</button>
        <ul id="groupList">
            <li id="groupId" class="group">
                <span class="todoAdd">Add Todo</span>
                <span class="groupBox">
                    <span class="groupName">Group Name</span>
                    <span class="groupToggle">Toggle</span>
                </span>
                <ul class="todoList">
                    <li class="todoBox">Item 1</li>
                  <li class="todoBox">Item 1</li>
                  <li class="todoBox">Item 1</li>
                  <li class="todoBox">Item 1</li>  
                  <li class="todoBox">Item 1</li>
                  <li class="todoBox">Item 1</li>
                  <li class="todoBox">Item 1</li>
                  <li class="todoBox">Item 1</li>
                  <li class="todoBox">Item 1</li>
                  <li class="todoBox">Item 1</li>
                  <li class="todoBox">Item 1</li>
                </ul>
            </li>
        </ul>
</body>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
 

Preparation code output

  • Add Todo Group Name Toggle
    • Item 1
    • Item 1
    • Item 1
    • Item 1
    • Item 1
    • Item 1
    • Item 1
    • Item 1
    • Item 1
    • Item 1
    • Item 1

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
1
var ele = $("body").find("li", $("#groupList"));
pending…
2
var ele = $("#groupList").find("li");
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