jQuery on vs jBone on vs addEventListener vs Zepto on (v22)

Revision 22 of this benchmark created on


Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="https://rawgit.com/kupriyanenko/jbone/1.0.23/dist/jbone.min.js"></script>
<script src="http://zeptojs.com/zepto.min.js"></script>

<div id="target"></div>

Test runner

Ready to run.

Testing in
TestOps/sec
jQuery solution
jQuery('#target').on('mousemove touchmove', function() {
  void(0)
});

jQuery('#target').off('mousemove touchmove', function() {
  void(0)
});
ready
jBone solution
jBone('#target').on('mousemove touchmove', function() {
  void(0)
});

jBone('#target').off('mousemove touchmove', function() {
  void(0)
});
ready
Native solution
var elem = document.getElementById('target');
elem.addEventListener('mousemove', function() {
  void(0)
});
elem.addEventListener('touchmove', function() {
  void(0)
});
elem.removeEventListener('mousemove', function() {
  void(0)
});
elem.removeEventListener('touchmove', function() {
  void(0)
});
ready
Zepto solution
Zepto('#target').on('mousemove touchmove', function() {
  void(0)
});
Zepto('#target').off('mousemove touchmove', function() {
  void(0)
});
ready

Revisions

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