Try/Catch Block Performance Comparison (v9)

Revision 9 of this benchmark created on


Description

Measuring the performance implications of a try/catch block.

Test runner

Ready to run.

Testing in
TestOps/sec
Plain
function assign() {
  var n = 1;
}

assign();
ready
Try/Catch Block
function assign() {
  var n = 1;
}

try{
  assign();
}catch(e){}
ready
Try/Catch Block With Error
function assign() {
  (0)();
}
try{
  assign();
}catch(e){}
ready

Revisions

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