Coffeescript vs javascript

JavaScript performance comparison

Revision 2 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
class Pistoles_īpašnieks {
    public numOfMagazines;
    constructor(numOfMagazines:number) {
        function useMagazines {
            this.numOfMagazines=this.numOfMagazines--        
        }
    }
}
class Policists extends Pistoles_īpašnieks {
    constructor(numOfMagazines:number ) {
        super(numOfMagazines=numOfMagazines+1)
    }
}
pending…
Js Way
(function() {
  var Pistoles_īpašnieks, Policists,
    __hasProp = {}.hasOwnProperty,
    __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };

  Pistoles_īpašnieks = (function() {

    function Pistoles_īpašnieks(numOfMagazines) {
      this.numOfMagazines = numOfMagazines;
    }

    Pistoles_īpašnieks.prototype.useMagazines = function() {
      return this.numOfMagazines--;
    };

    return Pistoles_īpašnieks;

  })();

  Policists = (function(_super) {

    __extends(Policists, _super);

    function Policists(numOfMagazines) {
      Policists.__super__.constructor.call(this, numOfMagazines + 1);
    }

    return Policists;

  })(Pistoles_īpašnieks);

}).call(this);
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