Try/FinallyBlock Loop Performance Comparison (v8)

Revision 8 of this benchmark created by H on


Description

Measuring the performance implications of a try/finally block used with loops.

Test runner

Ready to run.

Testing in
TestOps/sec
Plain Loop-base reference
for (var i = 0; i < 500; i++) {
  var n = 1;
}
var b = 10 * 10;
ready
Try/Finally Block Outside Loop
try {
  for (var i = 0; i < 500; i++) {
    var n = 1;
  }
} finally {
  var b = 10 * 10;
}
ready

Revisions

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