jQuery vs Lodash isFunction (v15)

Revision 15 of this benchmark created on


Preparation HTML

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

Test runner

Ready to run.

Testing in
TestOps/sec
JQuery - $.isFunction
function test(array) {
  for(var i = 0; i < array.length; i += 1) {
     $.isFunction(array[i]);
  }
};


test([0, 10, 11, 9, function(){}, 19238, 1248, 8, 0, 0, 2, -1, -5]);
ready
typeof
function test(array) {
  for(var i = 0; i < array.length; i += 1) {
     typeof array[i] === 'function';
  }
};


test([0, 10, 11, 9, function(){}, 19238, 1248, 8, 0, 0, 2, -1, -5]);
ready
_.isFunction
function test(array) {
  for(var i = 0; i < array.length; i += 1) {
     _.isFunction(array[i]);
  }
};


test([0, 10, 11, 9, function(){}, 19238, 1248, 8, 0, 0, 2, -1, -5]);
ready

Revisions

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