try-catch-performance-jls

JavaScript performance comparison

Test case created by Joseph Sheedy

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
try-catch
y = 0;
try {
  x = y();
} catch (e) {
  x = null;
}
pending…
if
y = 0;
if (typeof(y) === 'function') {
  x = y();
} else {
  x = null;
}
pending…

Compare results of other browsers

Revisions

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

0 Comments