jQuery selectors perf test (v2)

Revision 2 of this benchmark created on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<div>
<div id="a">
<div id="alpha.beta">
<div id="gamma.epsilon">
<div id="zeta">
</div></div></div></div></div>

Test runner

Ready to run.

Testing in
TestOps/sec
jQuery #1
var a = $('#gamma\\.epsilon');
ready
jQuery #2
var a = $("[id='gamma.epsilon']");
ready
Pure DOM
var a = document.getElementById('gamma.epsilon');
ready

Revisions

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