jQuery vs JavaScript Performance Comparison

JavaScript performance comparison

Revision 67 of this test case created by and last updated

Preparation code

<tr class="participation twoLevel partMyself">    <td class="pname">        <div style="width:182px">            <div class="avatarSmall" style="background-image: url('/builtstatic/1426856261/doodle/graphics/avatar.png')">                                <div class="gravatar" style="background-image: url('https://secure.gravatar.com/avatar/?s=30&amp;r=x&amp;d=blank');"></div>                            </div>            <label class="hiddenAcc" for="pname" title="l10n_yourName"></label>            <input class="form-control" id="pname" maxlength="64" name="name" placeholder="O teu nome" type="text" value="">        </div>    </td>        <td class="tsep disabled" data="0" id="box0" title="Qui 19-03-2015 Jogo">                                        <label class="hiddenAcc" for="option0">Qui 19-03-2015 Jogo</label>        <input id="option0" name="p" type="radio" disabled="disabled">                    </td>            <td class="tsep" data="1" id="box1" title="Qui 19-03-2015 Se for preciso">                                        <label class="hiddenAcc" for="option1">Qui 19-03-2015 Se for preciso</label>        <input id="option1" name="p" type="radio">                    </td>            <td class="tsep" data="2" id="box2" title="Qui 19-03-2015 Ainda não sei">                                        <label class="hiddenAcc" for="option2">Qui 19-03-2015 Ainda não sei</label>        <input id="option2" name="p" type="radio">                    </td>            <td class="" data="3" id="box3" title="Qui 19-03-2015 Não jogo">                                        <label class="hiddenAcc" for="option3">Qui 19-03-2015 Não jogo</label>        <input id="option3" name="p" type="radio">                    </td>        </tr>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
    

Preparation code output

<tr class="participation twoLevel partMyself"> <td class="pname"> <div style="width:182px"> <div class="avatarSmall" style="background-image: url('/builtstatic/1426856261/doodle/graphics/avatar.png')"> <div class="gravatar" style="background-image: url('https://secure.gravatar.com/avatar/?s=30&amp;r=x&amp;d=blank');"></div> </div> <label class="hiddenAcc" for="pname" title="l10n_yourName"></label> <input class="form-control" id="pname" maxlength="64" name="name" placeholder="O teu nome" type="text" value=""> </div> </td> <td class="tsep disabled" data="0" id="box0" title="Qui 19-03-2015 Jogo"> <label class="hiddenAcc" for="option0">Qui 19-03-2015 Jogo</label> <input id="option0" name="p" type="radio" disabled="disabled"> </td> <td class="tsep" data="1" id="box1" title="Qui 19-03-2015 Se for preciso"> <label class="hiddenAcc" for="option1">Qui 19-03-2015 Se for preciso</label> <input id="option1" name="p" type="radio"> </td> <td class="tsep" data="2" id="box2" title="Qui 19-03-2015 Ainda não sei"> <label class="hiddenAcc" for="option2">Qui 19-03-2015 Ainda não sei</label> <input id="option2" name="p" type="radio"> </td> <td class="" data="3" id="box3" title="Qui 19-03-2015 Não jogo"> <label class="hiddenAcc" for="option3">Qui 19-03-2015 Não jogo</label> <input id="option3" name="p" type="radio"> </td> </tr>

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
jQuery
var $el = $('td.tsep[title*="Jogo"]')
pending…
JavaScript
var $el = document.querySelector('td.tsep[title*="Jogo"]')
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