outer vs inner references (v2)

Revision 2 of this benchmark created by CD Sanchez on


Preparation HTML

<script>
  var x = 10, y = 11, z = 12, z = 13, a = 14, g = 15;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
outer reference
(function(){
    for(var i=0; i<1000; i++){
        x + y + z + a + g
    }
})();
ready
inner reference
(function(x,y,z,a,g){
    for(var i=0; i<1000; i++){
        x + y + z + a + g;
    }
})(x,y,z,a,g);
 
ready

Revisions

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