ho ho ho

JavaScript performance comparison

Revision 2 of this test case created by mt and last updated

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
arguments
function ho() {
  return arguments[0] ? 'Ho ' + arguments[0] : 'Ho!'
}

for (var i=0; i<100; i++) {
  ho(ho(ho(ho(ho()))));
}
pending…
param w/ +
function ho(p) {
  return p ? "Ho " + p : "Ho!"
}

for (var i=0; i<100; i++) {
  ho(ho(ho(ho(ho()))));
}
pending…
param w/ concat
function ho(e) {
  return e ? "Ho ".concat(e) : "Ho!"
}

for (var i=0; i<100; i++) {
  ho(ho(ho(ho(ho()))));
}
pending…
gsub
function ho(p) {
  if (!p) { return "Ho!"; }
  return p.replace(/!/g, ' ') + "Ho!"
}

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

Compare results of other browsers

Revisions

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

0 Comments