Try/Catch Error Perf (v33)

Revision 33 of this benchmark created on


Preparation HTML

<script>
  function tryCatch(undef) {
var a;
    try {
      return a;
    } catch (ex) {
      return null;
    }
  }

  function ifUndefinedCheck(undef) {
var a;
    if (a !== undefined) {
      return a;
    } else {
      return null;
    }
  }
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Try Catch
tryCatch();
ready
If Undefined Check
ifUndefinedCheck();
ready

Revisions

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