Jquery-selector-vs-native3

JavaScript performance comparison

Test case created

Preparation code

<div id="1" class="1">
    <span id="2" class="1">
    </span>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
 

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
$('#1');
$('#2');
$('.1');
$('div');
$('span');
pending…
Native
document.getElementById('1');
document.getElementById('2');
document.getElementsByClassName('1');
document.getElementsByTagName('div');
document.getElementsByTagName('span');
pending…

You can edit these tests or add even more tests to this page by appending /edit to the URL.

Compare results of other browsers

0 comments

Add a comment