jQuery .find() vs. context selector (v91)

Revision 91 of this benchmark created by JimmyJames on


Preparation HTML

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

<article>
<p>A test</p>
<p><iframe id="123"></iframe></p>
<p>This is text</p>
</article>
<div class="myOuterDivClass" id="myOuterDivId">

Setup

var article = document.querySelector('article');

Test runner

Ready to run.

Testing in
TestOps/sec
search class
var outer = $('.myOuterDiv');
ready
search id
var outer = $('#myOuterDivId');
ready

Revisions

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