)]}'
{
  "commit": "f55358c60f517763307c09ae57c3eadb6d23985e",
  "tree": "9ee7495a08daf31358f816ef41c1616a17a82d23",
  "parents": [
    "b766b4984be258e7d550d323a5c73721529b741c"
  ],
  "author": {
    "name": "Vitaly Goldshteyn",
    "email": "goldvitaly@google.com",
    "time": "Wed Oct 21 02:00:39 2026 -0700"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Wed Oct 21 02:01:28 2026 -0700"
  },
  "message": "Deduplicate backing array allocation in PrepareInsertSmallNonSoo to reduce binary size.\n\nIn `PrepareInsertSmallNonSoo`, growing from capacity 0 to 1 and growing from capacity 1 to 3 via `Grow1To3AndPrepareInsert` previously maintained two separate inlined copies of `policy.get_char_alloc`, `RawHashSetLayout`, and `AllocBackingArray`. Naively sharing the general `RawHashSetLayout` constructor between both paths introduces dynamic branching for `MetadataBeforeControlSize` and `NumControlBytes`, as well as extra `PHI` nodes across `policy.get_char_alloc` that spill registers to the stack.\n\nIntroduce `RawHashSetLayout::CreateForSmallNonSooGrowth` and an `AllocBackingArray` overload accepting `const RawHashSetLayout\u0026` so both small non-SOO growth paths share a single allocation sequence in `PrepareInsertSmallNonSoo`. Parameterizing the layout by `size \u003d common.size()` (`0` for 0 → 1, `1` for 1 → 3) computes `num_control_bytes \u003d size * NumControlBytes(3)` and `new_capacity \u003d NextCapacity(size)` directly from `size`, and computes `metadata_size` branchlessly without `GrowthInfoSizeForCapacity` (which is 0 for capacities 1 and 3). Because `Grow1To3AndPrepareInsert`, `AllocBackingArray`, and `RawHashSetLayout::CreateForSmallNonSooGrowth` are all inlined into `PrepareInsertSmallNonSoo`, this reduces the total compiled size of `PrepareInsertSmallNonSoo` (including all functions inlined into it) from 781 B to 716 B (-65 B / -8.3%) and shrinks its stack frame by 16 bytes.\n\nPiperOrigin-RevId: 1003760138\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "15a256f314b5bea4c959a9edbdae605b39fca15a",
      "old_mode": 33188,
      "old_path": "absl/container/internal/raw_hash_set.cc",
      "new_id": "0837bf9c713f245a2df74b7287caf400220bbd07",
      "new_mode": 33188,
      "new_path": "absl/container/internal/raw_hash_set.cc"
    },
    {
      "type": "modify",
      "old_id": "497078cce7206acada19f216e6545af330babbea",
      "old_mode": 33188,
      "old_path": "absl/container/internal/raw_hash_set.h",
      "new_id": "2d43ec49552aa100c5bc1bf2d486689e945b8dc5",
      "new_mode": 33188,
      "new_path": "absl/container/internal/raw_hash_set.h"
    },
    {
      "type": "modify",
      "old_id": "429d7cfcf390e65b1355d744fdf592cc78678472",
      "old_mode": 33188,
      "old_path": "absl/container/internal/raw_hash_set_test.cc",
      "new_id": "ed25c05f2efc53750e4bfeb0f654722b7f339ff1",
      "new_mode": 33188,
      "new_path": "absl/container/internal/raw_hash_set_test.cc"
    }
  ]
}
