JQ direct child or any child

Benchmark created by Alex on


Preparation HTML

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

Test runner

Ready to run.

Testing in
TestOps/sec
any child
var text = $('.foo p').text();
ready
direct child
var text = $('.foo > p').text();
ready

Revisions

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