looped call to function containing loop

JavaScript performance comparison

Test case created by

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
nested
function foo() {};

for (var i = 0; i < 100; i++) {
  for (var j = 0; j < 100; j++) {
    for (var k = 0; k < 100; k++) {
      foo();
    }
  }
}
pending…
outer
function foo() {}

function update() {
  // called;
  for (var k = 0; k < 100; k++) {
    foo();
  }
}

function call() {
  // called;
  for (var j = 0; j < 100; j++) {
    update();
  }
}

for (var i = 0; i < 100; i++) {
  call();
}
pending…

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

Compare results of other browsers

0 Comments