$().click vs addEventListener

Benchmark created on


Preparation HTML

<div id="test"></div><script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>
  var func = function() {};
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
$().click
var elm = $("#test");
elm.unbind("click", func);
elm.bind("click", func);
ready
addEventListener
var elm = document.getElementById("test");
elm.removeEventListener("click", func, false);
elm.addEventListener("click", func, false);
ready

Revisions

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