Find vs jQuery DOM

Benchmark created 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
Find
$("body").append('<div id="thisid">');
$("body").find("#thisid").click(function () { $.noop(); });
ready
DOM
$("<div>").attr('id', 'thisid').click(function () { $.noop(); }).appendTo("body")
ready
Selector Only
$("body").append('<div id="thisid">');
$("#thisid").click(function () { $.noop(); });
ready

Revisions

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