Data Access Tests (v2)

Revision 2 of this benchmark created on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/ext-core/3.1.0/ext-core.js">
</script>
<script>
  var pi = Math.PI
  var a = new Array(10000), e;

var a = 1;

var zeta= (function (aValue) {
   var something = aValue;
   return {
      someValue: 1,
      beta: {
         someValue: 2,
         gamma: {
            someValue: 3,
            delta: {
               someValue: 4,
               epsilon: {
                  someValue: 1
               }
            }
         }
      }
   };
}(a));

var alpha= {
   someValue: 1,
   beta: {
      someValue: 2,
      gamma: {
         someValue: 3,
         delta: {
            someValue: 4,
            epsilon: {
               someValue: 1
            }
         }
      }
   }
};

</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Single access
var t = alpha.someValue;
ready
Three Deep
var t = alpha.beta.gamma.someValue;
ready
Five Deep
var t = alpha.beta.gamma.delta.epsilon.someValue;
ready
Single Closure
var y = zeta.someValue;
ready
Three Closure
var y = zeta.beta.gamma.someValue;
ready
Five Closure.
var y = zeta.beta.gamma.delta.epsilon.someValue;
ready

Revisions

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