Try/Catch Slow Down (v3)

Revision 3 of this benchmark created on


Description

How much does try/catch slow you down?

Setup

junk = [];

Test runner

Ready to run.

Testing in
TestOps/sec
with try/catch
try {
    throw undefined;
} catch (e) {
    e = Math.random();
    junk[0] = e;
}
ready
without try/catch
junk[0] = Math.random();
ready

Revisions

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