instanceof vs typeof (v2)

Revision 2 of this benchmark created on


Setup

function f() {}
      var _Function = Function;
      var x;

Test runner

Ready to run.

Testing in
TestOps/sec
typeof
x = (typeof f === "function");
ready
instanceof
x = (f instanceof _Function);
ready

Revisions

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