typeof instanceof constructor badass

Benchmark created by Kenan Sulayman on


Setup

var obj = {};
    var arr = [];
    var fun = function () {};

Test runner

Ready to run.

Testing in
TestOps/sec
typeof
typeof obj === "function";
typeof arr === "function";
typeof fun === "function";
ready
instanceof
obj instanceof Function;
arr instanceof Function;
fun instanceof Function;
ready
constructor
obj.constructor === Function;
arr.constructor === Function;
fun.constructor === Function;
ready

Revisions

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

  • Revision 1: published by Kenan Sulayman on