comparing underscore.js 'isFunction' with 'typeof function' (v8)

Revision 8 of this benchmark created on


Preparation HTML

<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>

Test runner

Ready to run.

Testing in
TestOps/sec
underscore isFunction
var obj = function() {
    console.log("test")
    };
return $.isFunction(obj);
ready
typeof 'function'
var obj = function() {
    console.log("test")
    };
return 'function' === typeof obj;
ready
typeof(Function)
var obj = function() {
    console.log("test")
    };
return typeof(obj) === typeof(Function);

 
ready

Revisions

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