instanceof Function vs typeof === "function" (v3)

Revision 3 of this benchmark created on


Setup

function foo {}

Test runner

Ready to run.

Testing in
TestOps/sec
foo instanceof
const bar = foo instanceof Function
ready
typeof foo
const bar = typeof foo === "function"
ready

Revisions

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