Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
JQuery: find vs selector vs scoped selector
Test which solution find quicker element
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Browser:
Chrome 135
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
find with "find"
3492442.0 Ops/sec
find with selector and scope
2948016.5 Ops/sec
find with selector
6990852.5 Ops/sec
HTML Preparation code:
<a id="parent" > <div><div><div></div><div><div><div></div><div><div><div> <span id="child">Need span</span> <div></div></div></div></div></div></div></div><div></div></div> <svg class="icon md-16 icon-shevron-right text-muted"></svg> </a> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.js'></script>
Script Preparation code:
var $element = $("#parent");
Tests:
find with "find"
$element.find("#child");
find with selector and scope
$("#child", $element);
find with selector
$("#child");