$().click vs addEventListener (v6)

Revision 6 of this benchmark created on


Preparation HTML

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

Test runner

Ready to run.

Testing in
TestOps/sec
$().click
$('#test').click(function(){
  console.log('hi');
});
ready
addEventListener
document.getElementById('test').addEventListener('click', function(){
  console.log('hi');
});
ready

Revisions

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