$().click vs addEventListener (v7)

Revision 7 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, Im jquery');
});
ready
addEventListener
document.getElementById('test').addEventListener('click', function(){
  console.log('hi, Im javascript');
});
ready

Revisions

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