instanceof vs. typeof

Benchmark created on


Setup

function test() {}

Test runner

Ready to run.

Testing in
TestOps/sec
instanceof
console.log(test instanceof Function);
ready
typeof
console.log(typeof test === 'function');
ready

Revisions

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