Exception performance (v4)

Revision 4 of this benchmark created on


Description

Testing exception .vs. normal flows in try-catch blocks

Test runner

Ready to run.

Testing in
TestOps/sec
Normal flow
return ['foo'] // Not thrown
ready
Exception flow
try {
 throw new Error('foo'); // Thrown
} catch (e) {}
ready
Empty block
try {
 'foo'
} catch (e) {}
ready
Throw constant
try {
 throw 'foo'
} catch (e) {}
ready
Undefined Exception
try {
 undefined["doesn't exist"]; // Thrown
} catch (e) {}
ready

Revisions

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

  • Revision 1: published by Robert Kieffer on
  • Revision 2: published by Bruno Garcia on
  • Revision 4: published on