Query by ID

JavaScript performance comparison

Test case created by amcgregor

Preparation code

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

Preparation code output

<div id="id">bob</div>

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 Selector
$('#id');
pending…
Native Selector
document.querySelector('#id');
pending…
Native Getter
document.getElementById('id');
pending…
Native Direct
window['id']
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

bob