jQuery vs. Prototype vs. jBone vs _j (v25)

Revision 25 of this benchmark created by LZAntal on


Description

This is a comparison of selector engine speed between jQuery 2.0.3 and Prototype 1.7.1 and jBone and _j 0.4

Preparation HTML

<!doctype html>
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/prototype/1.7.1.0/prototype.js">
</script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="//rawgithub.com/kupriyanenko/jbone/master/dist/jbone.js">
</script>
<script src="http://lzacorp.com/_jv0.4/_j.min.js"></script>


</head>
<body>
<ul id="list">
<li>
<ul class="sublist">
<li>
item1
</li>
<li>
item2
</li>
</ul>
</li>
<li>
<ul class="sublist">
<li>
item1
</li>
<li>
item2
</li>
</ul>
</li><li>
<ul class="sublist">
<li>
item1
</li>
<li>
item2
</li>
</ul>
</li><li>
<ul class="sublist">
<li>
item1
</li>
<li>
item2
</li>
</ul>
</li>
</ul>
</body>
</html>

Test runner

Ready to run.

Testing in
TestOps/sec
jquery
var jq = jQuery("#list .sublist li");
ready
Prototype
var pt = $$("#list .sublist li");
ready
jBone
var pt = jBone("#list .sublist li");
ready
_j
var j = _jSel("#list .sublist li");
ready

Revisions

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