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

Revision 9 of this benchmark created on


Preparation HTML

<script src="http://underscorejs.org/underscore.js"></script>

<script>
    var obj = function () { };
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
underscore isFunction
typeof obj == 'function' || false;
ready
Actual _.isFunction
_.isFunction(obj);
ready
'function' === typeof
'function' === typeof obj;
ready
typeof === 'function'
typeof obj === 'function';
ready

Revisions

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