Tests:
  • No fat arrow

    AخA
     
    var Obj = (function () {
        function Obj(a, b) {
            this.a = a;
            this.b = b;
        }
        ;
        Obj.prototype.c = function (v) {
            return this.a + v;
        };
        Obj.prototype.d = function (v) {
            return this.a + this.b + v;
        };
        return Obj;
    }());
    var obj = new Obj(1, 2);
    var e = 1;
    var e = obj.c(e) + obj.d(e + 1);
  • With fat arrow

     
    function makeObj(a, b) {
        return {
            c: function (v) {
                return a + v;
            },
            d: function (v) {
                return a + b + v;
            }
        };
    }
    var obj = makeObj(1, 2);
    var e = 1;
    var e = obj.c(e) + obj.d(e + 1);
  • With fat arrow and let

     
    function makeObj(_a, _b) {
        var a = _a;
        var b = _b;
        return {
            c: function (v) {
                return a + v;
            },
            d: function (v) {
                return a + b + v;
            }
        };
    }
    var obj = makeObj(1, 2);
    var e = 1;
    var e = obj.c(e) + obj.d(e + 1);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    No fat arrow
    With fat arrow
    With fat arrow and let

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36
Chrome 89 on Mac OS X 11.2.3
View result in a separate tab
Test name Executions per second
No fat arrow 341502.0 Ops/sec
With fat arrow 77240144.0 Ops/sec
With fat arrow and let 78141984.0 Ops/sec