jQuery search dom elements

Benchmark created by Matthias Krumm on


Description

Get all spans.

Just very simple markup. Further tests should have more and complex markup.

Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<div id="foo1"><span>bar1</span><span>bar2</span></div>

Test runner

Ready to run.

Testing in
TestOps/sec
search1 plain
$("span");
ready
search2 find
$("div").find("span");
ready
search3 context
$("span", "div");
ready

Revisions

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

  • Revision 1: published by Matthias Krumm on