nested closure (v2)

Revision 2 of this benchmark created by jurassicPieter on


Preparation HTML

<script>
  function a(value) {
    return a_a(value) + a_c(value);
  }
  
  function a_a(value) {
    return value * 2;
  }
  
  function a_c(value) {
    return value * 3;
  }
  
  var d = (function() {
    var a = function(value) {
        return value * 2;
        }
        
    var b = function(value) {
        return value * 3;
        }
        
    return function(value) {
      return a(value) + b(value);
    }
  }());
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
without closure
a(33);
ready
with closure
d(33);
ready

Revisions

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

  • Revision 1: published by Francis on
  • Revision 2: published by jurassicPieter on