Multi select

JavaScript performance comparison

Revision 3 of this test case created

Info

Test

Preparation code

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

<ul>
    <li>
        <label>What's your name?</label>
        <input type="password">
    </li>
    <li>
        <label>What's your name?</label>
        <input type="password">
    </li>
    <li>
        <label>What's your name?</label>
        <input type="password">
    </li>
    <li>
        <label>What's your name?</label>
        <input type="password">
    </li>
    <li>
        <label>What's your name?</label>
        <input type="password">
    </li>
    <li>
        <label>What's your name?</label>
        <input type="password">
    </li>
    <li>
        <label>What's your name?</label>
        <input type="password">
    </li>
    <li>
        <label>What's your name?</label>
        <input type="password">
    </li>
    <li>
        <label>What's your name?</label>
        <input type="password">
    </li>
    <li>
        <label>What's your name?</label>
        <input type="password">
    </li>
    <li>
        <label>What's your name?</label>
        <input class="input-box" id="inputBox0" type="text" value="Jan">
        <input class="input-box" id="inputBox1" type="text" value="Jan">
        <input class="input-box" id="inputBox2" type="text" value="Jan">
        <input class="input-box" id="inputBox3" type="text" value="Jan">
        <input class="input-box" id="inputBox4" type="text" value="Jan">
        <input class="input-box" id="inputBox5" type="text" value="Jan">
        <input class="input-box" id="inputBox6" type="text" value="Jan">
        <input class="input-box" id="inputBox7" type="text" value="Jan">
        <input class="input-box" id="inputBox8" type="text" value="Jan">
        <input class="input-box" id="inputBox9" type="text" value="Jan">
    </li>
</ul>

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
$("#inputBox");
$("#inputBox0,#inputBox1,#inputBox2,#inputBox3,#inputBox4,#inputBox5,#inputBox6,#inputBox7,#inputBox8,#inputBox9").hide();
pending…
Document
document.getElementById('inputBox0').style.display = 'none';
document.getElementById('inputBox1').style.display = 'none';
document.getElementById('inputBox2').style.display = 'none';
document.getElementById('inputBox3').style.display = 'none';
document.getElementById('inputBox4').style.display = 'none';
document.getElementById('inputBox5').style.display = 'none';
document.getElementById('inputBox6').style.display = 'none';
document.getElementById('inputBox7').style.display = 'none';
document.getElementById('inputBox8').style.display = 'none';
document.getElementById('inputBox9').style.display = 'none';
 
pending…
jquery single select
$("#inputBox0").hide();
$("#inputBox1").hide();
$("#inputBox2").hide();
$("#inputBox3").hide();
$("#inputBox4").hide();
$("#inputBox5").hide();
$("#inputBox6").hide();
$("#inputBox7").hide();
$("#inputBox8").hide();
$("#inputBox9").hide();
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