Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
jQuery Selector v3
testing .find vs inline selector
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
Browser:
Chrome 128
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Inline Selector
425455.7 Ops/sec
Find
1611548.6 Ops/sec
Ignore root
122357.9 Ops/sec
Include types
412584.6 Ops/sec
include find type
1606244.4 Ops/sec
HTML Preparation code:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script> <div id="#test-root"><div class="test-child"></div></div>
Tests:
Inline Selector
jQuery('#test-root .test-child').css('border', '1px solid red');
Find
jQuery('#test-root').find('.test-child').css('border', '1px solid red');
Ignore root
jQuery('.test-child').css('border', '1px solid red');
Include types
jQuery('div#test-root div.test-child').css('border', '1px solid red');
include find type
jQuery('#test-root').find('div.test-child').css('border', '1px solid red');