Prototype dollar dollar or element.select

Benchmark created by Seengee on


Description

Testing the performance difference between the Prototype methods of $$ and Element.select

Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/prototype/1.6.1.0/prototype.js"></script>
<div id="container">
    <span class="testcase">One</span>
    <span class="testcase">Two</span>
    <span class="testcase">Three</span>
    <span class="testcase">Four</span>
</div>

Test runner

Ready to run.

Testing in
TestOps/sec
Dollar-Dollar
$$('.testcase')
ready
Dollar-Dollar alternate
$$('#container .testcase')
ready
Element.select
$('container').select('.testcase')
ready

Revisions

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