Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
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
Benchmark engine:
Benchmark.js
Find
1.6M/s
include find type
1.6M/s
Inline Selector
425K/s
Include types
413K/s
Ignore root
122K/s
View exact numbers
Test name
Executions per second
✓
Find
1,611,549 Ops/sec
include find type
1,606,244 Ops/sec
Inline Selector
425,456 Ops/sec
Include types
412,585 Ops/sec
Ignore root
122,358 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');