jQuery vs Lodash isFunction

JavaScript performance comparison

Revision 15 of this test case created

Preparation code

<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>

Preparation code output

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/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]);
pending…
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]);
pending…
_.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]);
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

0 comments

Add a comment