Loop testing. (v8)

Revision 8 of this benchmark created by John Bateman 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;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Loop
var length = a.length;
for (var i = 0, len = length; i < len; i++) {
  e = pi;
};
ready
Ext.each
Ext.each(a, function() {
  e = pi;
});
ready
While countdown.
var length = a.length;
while (length) {
  e = pi;
  length--
};
ready

Revisions

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