Coffeescript vs javascript

JavaScript performance comparison

Revision 6 of this test case created

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
CoffeescriptWay
testObj = {
  someString: "someString",
  someArray: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
  someObject: {
    someString: "someString",
    someArray: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
  }
};
for (var _j = 0, _len1 = testObj.length; _j < _len1; _j++) {
  obj = testObj[_j];
  return obj;
}
pending…
Js Way
testObj = {
  someArray: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
  someObject: {
    someString: "someString",
    someArray: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
  }
}
for (var _i = 0, len1; _i < testObj.length; _i++) {
  return testObj[_i]
}
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. Here’s a list of current revisions for this page:

0 comments

Add a comment