)]}'
{
  "commit": "ab2829ec06cbe7fb1464bcf929fffcd6a7ad68b8",
  "tree": "04cf02876710e965a3a9acd7b7a620ce7780012f",
  "parents": [
    "54b82e944ebccb612f4f300c66f9a0230b43b24c"
  ],
  "author": {
    "name": "David Chase",
    "email": "drchase@google.com",
    "time": "Mon Nov 17 13:53:58 2025 -0500"
  },
  "committer": {
    "name": "David Chase",
    "email": "drchase@google.com",
    "time": "Wed Nov 26 08:40:35 2025 -0800"
  },
  "message": "cmd/compile: adjust start heap size\n\nTLDR\n- not-huge increase to default starting heap boost,\n- small improvement in build performance,\n- remove concurrency dependence of starting heap,\n- aligns RSS behavior with GOMEMLIMIT,\n- adds a gcflags\u003d-d\u003dgcstart\u003dN (N -\u003e N MiB) flag for\n  people who want to trade a lot of memory for a\n  little build performance improvement.\n\nThis removes concurrency (-c flag) sensitivity and increases the\nnominal default to 128MiB.\n\nRefactored the startheap code into a separate file, to make it\neasier to extract and reuse.\n\nAdded sensitivity to concurrency\u003d1 and GOMEMLIMIT!\u003d\"\" (in addition\nto existing GOGC!\u003d\"\"), those disable the default starting heap boost\nbecause the compiler-invoker has indicated either a desire to control\nthe GC or a desire to run in minimum memory(or both).\n\nAdds a -d flag gcstart\u003dN (N is number of MiB) for\ntinkering/experiments. This always enables the starting heap.\n(`GOGC\u003dXXX` and `-d\u003dgcstart\u003dYYY` will use `GOGC\u003dXXX` after starting\nheap size is achieved.)\n\nDerated the \"boost\" obtained by a factor of .70 so that\n`-d\u003dgcstart\u003d2000` yields the same RSS as `GOMEMLIMIT\u003d2000MiB`\n\n(Actually adjusts the boost with a high-low breakpoint.)\n\nThe parent, with concurrency sensitivity, provided 64MB of plain\nboost.  Derating reduces the effects of boosting the starting heap\nslightly.  The benchmark here shows that maintaining 64MB results in\na minor regression, while increasing it to 128MB produces a slight\nimprovement, and does not grow the RSS versus 64MB.\n\n```\n        │   parent    │                sh64                │               sh128                │              sh1024               │\n        │   sec/op    │   sec/op     vs base               │   sec/op     vs base               │   sec/op    vs base               │\nstd       10.164 ± 1%   10.527 ± 1%  +3.57% (p\u003d0.000 n\u003d50)   10.084 ± 1%  -0.79% (p\u003d0.000 n\u003d50)   9.631 ± 1%  -5.24% (p\u003d0.000 n\u003d50)\ncompile    21.05 ± 1%    20.78 ± 0%  -1.28% (p\u003d0.000 n\u003d50)    20.74 ± 1%  -1.46% (p\u003d0.000 n\u003d50)   20.77 ± 0%  -1.32% (p\u003d0.001 n\u003d50)\nast        20.45 ± 1%    20.39 ± 1%       ~ (p\u003d0.334 n\u003d50)    20.44 ± 0%       ~ (p\u003d0.818 n\u003d50)   20.11 ± 1%  -1.65% (p\u003d0.000 n\u003d50)\ngeomean    16.35         16.46       +0.65%                   16.23       -0.76%                  15.90       -2.75%\n\n        │   parent    │                sh64                │               sh128                │               sh1024               │\n        │ user-sec/op │ user-sec/op  vs base               │ user-sec/op  vs base               │ user-sec/op  vs base               │\nstd        66.06 ± 0%    69.74 ± 0%  +5.56% (p\u003d0.000 n\u003d50)    64.68 ± 0%  -2.09% (p\u003d0.000 n\u003d50)    59.51 ± 0%  -9.91% (p\u003d0.000 n\u003d50)\ncompile    84.69 ± 1%    82.54 ± 0%  -2.53% (p\u003d0.000 n\u003d50)    82.63 ± 0%  -2.43% (p\u003d0.000 n\u003d50)    82.66 ± 1%  -2.40% (p\u003d0.000 n\u003d50)\nast        59.41 ± 0%    58.84 ± 1%  -0.95% (p\u003d0.011 n\u003d50)    59.48 ± 1%       ~ (p\u003d0.341 n\u003d50)    57.13 ± 1%  -3.83% (p\u003d0.000 n\u003d50)\ngeomean    69.27         69.71       +0.63%                   68.25       -1.47%                   65.50       -5.44%\n\n        │   parent   │                sh64                │               sh128               │              sh1024               │\n        │ sys-sec/op │ sys-sec/op   vs base               │ sys-sec/op  vs base               │ sys-sec/op  vs base               │\nstd       9.599 ± 1%   10.031 ± 1%  +4.50% (p\u003d0.000 n\u003d50)   9.513 ± 1%  -0.90% (p\u003d0.014 n\u003d50)   9.359 ± 1%  -2.50% (p\u003d0.000 n\u003d50)\ncompile   6.813 ± 1%    6.740 ± 1%  -1.08% (p\u003d0.017 n\u003d50)   6.716 ± 1%  -1.42% (p\u003d0.006 n\u003d50)   6.696 ± 1%  -1.72% (p\u003d0.000 n\u003d50)\nast       4.315 ± 1%    4.291 ± 1%       ~ (p\u003d0.781 n\u003d50)   4.296 ± 1%       ~ (p\u003d0.792 n\u003d50)   4.279 ± 2%       ~ (p\u003d0.124 n\u003d50)\ngeomean   6.559         6.620       +0.93%                  6.499       -0.92%                  6.449       -1.68%\n\n        │     parent     │                 sh64                  │                 sh128                 │                 sh1024                  │\n        │ peak-RSS-bytes │ peak-RSS-bytes  vs base               │ peak-RSS-bytes  vs base               │ peak-RSS-bytes  vs base                 │\nstd         257.1Mi ± 1%     257.2Mi ± 1%       ~ (p\u003d0.754 n\u003d50)     257.0Mi ± 0%       ~ (p\u003d0.570 n\u003d50)     605.6Mi ± 0%  +135.59% (p\u003d0.000 n\u003d50)\ncompile    1007.2Mi ± 1%    1004.3Mi ± 0%       ~ (p\u003d0.064 n\u003d50)    1007.4Mi ± 0%       ~ (p\u003d0.348 n\u003d50)    1009.4Mi ± 1%         ~ (p\u003d0.598 n\u003d50)\nast         1.848Gi ± 0%     1.842Gi ± 0%       ~ (p\u003d0.079 n\u003d50)     1.824Gi ± 0%  -1.25% (p\u003d0.000 n\u003d50)     1.856Gi ± 0%    +0.47% (p\u003d0.000 n\u003d50)\ngeomean     788.3Mi          786.8Mi       -0.19%                    785.0Mi       -0.41%                    1.027Gi        +33.37%\n```\n\nUpdates #73044\n\nChange-Id: I6359642a94b396e696dd57e64ed1f2c4cf178475\nReviewed-on: https://go-review.googlesource.com/c/go/+/724441\nReviewed-by: Keith Randall \u003ckhr@google.com\u003e\nReviewed-by: Keith Randall \u003ckhr@golang.org\u003e\nLUCI-TryBot-Result: Go LUCI \u003cgolang-scoped@luci-project-accounts.iam.gserviceaccount.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ee3772c5ca2bfa44feae2978405fd61b4ae4ebd9",
      "old_mode": 33188,
      "old_path": "src/cmd/compile/internal/base/base.go",
      "new_id": "405c7938a51aad16e92f69b8ff480e85b61b78bb",
      "new_mode": 33188,
      "new_path": "src/cmd/compile/internal/base/base.go"
    },
    {
      "type": "modify",
      "old_id": "b532bf435e81ca2c06caa61b81d96ff6ecf786cf",
      "old_mode": 33188,
      "old_path": "src/cmd/compile/internal/base/debug.go",
      "new_id": "e32a07d461720f79d47474e09c084fed9c3cce83",
      "new_mode": 33188,
      "new_path": "src/cmd/compile/internal/base/debug.go"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "1d2713efdbc3f9e6d847d57e0853ff4c123639ac",
      "new_mode": 33188,
      "new_path": "src/cmd/compile/internal/base/startheap.go"
    },
    {
      "type": "modify",
      "old_id": "2a3a3f786b352abd4f3014b6cc4696eb0ba2e3cf",
      "old_mode": 33188,
      "old_path": "src/cmd/compile/internal/gc/main.go",
      "new_id": "afa16508d1994e924e97d42d98263177aa403da9",
      "new_mode": 33188,
      "new_path": "src/cmd/compile/internal/gc/main.go"
    }
  ]
}
