try catch vs function (v3)

Revision 3 of this benchmark created on


Preparation HTML

<script>
  var l = 100;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
try {} catch(){}
for (var i = 0; i < l; ++i) {
  try {
    throw i
  } catch (b) {
    b += 10;
  }
}
ready
(function(){}())
for (var i = 0; i < l; ++i) {
  (function(b) {
    b += 10;
  }(i));
}
ready

Revisions

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