$jquery vs native with wrapper (v3)

Revision 3 of this benchmark created on


Preparation HTML

<div id="hitMe"></div>

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

Setup

var $hitbutton;

Test runner

Ready to run.

Testing in
TestOps/sec
only jquery
(function($){
$hitButton = $("#hitMe");
console.log($hitbutton);
}(jQuery));
ready
with wrapper using native
(function($){
$hitButton = $( document.getElementById("hitMe") );
console.log($hitbutton);
}(jQuery));
ready
queryselectorall
(function($){
$hitButton = $( document.querySelectorAll("#hitMe") );
console.log($hitbutton);
}(jQuery));
ready

Revisions

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