Loop De Loop (with class)

JavaScript performance comparison

Revision 6 of this test case created by Elijah Manor

Preparation code

<ol style="display: none;"></ol>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js">
Benchmark.prototype.setup = function() {
    for ( var i = 0; i < 500; i++ ) {
      $( "<li class='le-li'>first</li>" ).appendTo( "ol" );

Preparation code output

    Test runner

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

    Java applet disabled.

    Testing in unknown unknown
    Test Ops/sec
    jquery chains
      .attr("alt", "myAlt")
      .attr("title", "myTitle")
      .attr("data-test1", "test1")
      .attr("data-test2", "test2")
      .attr("data-test3", "test3")
      .attr("data-test4", "test4")
      .attr("data-test5", "test5")
      .attr("data-test6", "test6")
      .attr("data-test7", "test7")
      .attr("data-test8", "test8");
    jquery "loop"
      "alt": "myAlt",
      "title": "myTitle",
      "data-test1": "test1",
      "data-test2": "test2",
      "data-test3": "test3",
      "data-test4": "test4",
      "data-test5": "test5",
      "data-test6": "test6",
      "data-test7": "test7",
      "data-test8": "test8"

    Compare results of other browsers


    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:


    Comment form temporarily disabled.

    Add a comment