Trying Out jsPerf (v5)

Revision 5 of this benchmark created on


Description

Testing this out

Preparation HTML

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

<p>Test1</p>
<p>Test2</p>
<p id="findme"><div class='mydiv'>Test3</div></p>
<p>Test4</p>
<p class='last'>Test5</p>

Test runner

Ready to run.

Testing in
TestOps/sec
Select with prefix
var x = $('p#findme');
ready
Direct ID Select
var x = $('#findme');
ready
Child Selector
var x = $('p').attr('id', 'findme');
ready

Revisions

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