Coffeescript vs javascript

JavaScript performance comparison

Revision 5 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 = {
  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 (_j = 0; _j < testObj.length; _j++) {
  return testObj[_j];
}
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; _i < testObj.length; _i++) {
  return testObj[_i]
}
pending…
Js Way 2
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, len = testObj.length; _i < len; _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