type of a variable (v8)

Revision 8 of this benchmark created by alexz on


Setup

var x,
        obj = { 'one': 1},
        arr = ['one', 1];
    
    function func() {
        return 42;
    }

Test runner

Ready to run.

Testing in
TestOps/sec
obj typeof
x = (typeof obj == "object");
ready
obj typeof ===
x = (typeof obj === "object");
ready
arr isArray()
x = Array.isArray(arr);
ready
func typeof
x = (typeof func == "function");
ready
func typeof ===
x = (typeof func === "function");
ready

Revisions

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