)]}'
{
  "commit": "c9a2ab369950b498dfd7d4e53fd38f7df616803a",
  "tree": "65a44bd9357dd68e4e8b1df6ea7010dc769c5a90",
  "parents": [
    "dca4598c94df40d5c693e058c663e24aa1a92610"
  ],
  "author": {
    "name": "Austin Clements",
    "email": "austin@google.com",
    "time": "Tue Aug 05 16:22:15 2025 -0400"
  },
  "committer": {
    "name": "Gopher Robot",
    "email": "gobot@golang.org",
    "time": "Wed Aug 06 10:01:06 2025 -0700"
  },
  "message": "internal/unify: use arbitrary expressions for environment sets\n\nCurrently, nonDetEnv, which represents a set of environments, uses a\nrestricted algebraic form consisting of a cross-product of sets of\nenvironments. Unfortunately, this restriction means that if we want to\nunion two environment sets, we may need to multiply factors out in\norder to normalize the result into this restricted representation. In\nsome cases, this can result in exponential blowup. For example, if\nthere are nested sums, then the environment will contain bindings of\nvariables that don\u0027t matter for whole branches of the value\nexpression, but that still participate when constructing the union of\nenvironment sets. These dead variables wind up expanding the\nenvironment representation exponentially, even though they have no\neffect.\n\nTo fix this, we lift this restriction. Now, a nonDetEnv is an\narbitrary algebraic expression of unions and cross-products. This is\nactually much simpler, implementation-wise, and addresses this\nexponential blowup problem.\n\nWe add a stress test demonstrated nested sums that prior to this\nchange required 12 GB of RAM and took 20 seconds to unify. With this\nchange, it takes 90 MB of RAM and a fraction of a second.\n\nWe\u0027re about to add \"import\" support to YAML, which will tend to create\nthese nested sums. Thus we have to fix this first.\n\nThis has no effect on the output of simdgen. Curiously, it also has no\neffect on the time of simdgen, but it does reduce its memory by almost\n10x:\n\n        │ /tmp/before.bench │       /tmp/after.bench        │\n        │      sec/op       │   sec/op     vs base          │\nSimdgen          26.40 ± 3%   26.49 ± 26%  ~ (p\u003d1.000 n\u003d10)\n\n        │ /tmp/before.bench │            /tmp/after.bench            │\n        │  peak-RSS-bytes   │ peak-RSS-bytes  vs base                │\nSimdgen       1443.4Mi ± 1%     178.4Mi ± 1%  -87.64% (p\u003d0.000 n\u003d10)\n\nChange-Id: Idaecb8693065c61d5d63afbc1014d3300886def8\nReviewed-on: https://go-review.googlesource.com/c/arch/+/693338\nLUCI-TryBot-Result: Go LUCI \u003cgolang-scoped@luci-project-accounts.iam.gserviceaccount.com\u003e\nReviewed-by: Junyang Shao \u003cshaojunyang@google.com\u003e\nAuto-Submit: Austin Clements \u003caustin@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "143fa615dc48b067136b3797f4f66fdede62e5b6",
      "old_mode": 33188,
      "old_path": "internal/unify/dot.go",
      "new_id": "a26b9dad0f2e59d18fec06a610ba7f25f1f79750",
      "new_mode": 33188,
      "new_path": "internal/unify/dot.go"
    },
    {
      "type": "modify",
      "old_id": "618887cdf29ced674082c4ab81be9a5e3e74fc23",
      "old_mode": 33188,
      "old_path": "internal/unify/env.go",
      "new_id": "0f45af3933da17898a7ec2e13edbf4fd418b0669",
      "new_mode": 33188,
      "new_path": "internal/unify/env.go"
    },
    {
      "type": "modify",
      "old_id": "d2434fe479e1ac9b65d24a3bd47868daefca9f24",
      "old_mode": 33188,
      "old_path": "internal/unify/html.go",
      "new_id": "d59bd8fc16447c3def3b43115a76cc2f6605eb23",
      "new_mode": 33188,
      "new_path": "internal/unify/html.go"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e4478536804dbd56cd5a78c55b58d721386274cb",
      "new_mode": 33188,
      "new_path": "internal/unify/testdata/stress.yaml"
    },
    {
      "type": "modify",
      "old_id": "1b1c8139cf04648cd02192ca15f394fc051fce28",
      "old_mode": 33188,
      "old_path": "internal/unify/yaml.go",
      "new_id": "ff5115f7fc9d521b509e6c913721f41c6830934c",
      "new_mode": 33188,
      "new_path": "internal/unify/yaml.go"
    }
  ]
}
