Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
JQuery: find vs id 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/131.0.0.0 Safari/537.36
Browser:
Chrome 131
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
find with tag selector
1649714.8 Ops/sec
find with id
3318220.8 Ops/sec
HTML Preparation code:
<a id="parent" > <span id="child">Need span</span> <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 tag selector
$element.find("span");
find with id
$("#child");