Script Preparation code:
x
 
var MergeState = (function () {
        function MergeState() {
            this.writeVersion = 0;
            this.deepInspect = false;
        }
        MergeState.prototype.derive1 = function () {
            var ret = new MergeState();
            ret.writeVersion = this.writeVersion;
            ret.deepInspect = this.deepInspect;
            return ret;
        };
        MergeState.prototype.derive2 = function () {
            var ret = {};
            Object.setPrototypeOf(ret, this);
            return ret;
        };
        return MergeState;
    }());
var base = new MergeState();
Tests:
  • Manual clone

     
    var der = base.derive1();
  • Prototype

     
    var der = base.derive2();
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Manual clone
    Prototype

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 8 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36
Chrome 53 on Mac OS X 10.10.5
View result in a separate tab
Test name Executions per second
Manual clone 9802892.0 Ops/sec
Prototype 1620940.2 Ops/sec