typeof check

Benchmark created by hij1nx on


Description

Optimal order of operations

Preparation HTML

<script>
  function func() {};
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
A
if('function' === typeof func) {
  1==1;
}
ready
B
if(typeof func === 'function') {
  1==1;
}
ready

Revisions

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