)]}'
{
  "commit": "05321e8e0f67e1067e140f72a3331d94dc1df8b5",
  "tree": "4a0b12f4a602c88b4cd4e17ffe5638eb3ef1eb9f",
  "parents": [
    "14059fa48fc32ba22f2da4d0351826eea22f7dc3"
  ],
  "author": {
    "name": "Marcin Kowalczyk",
    "email": "qrczak@google.com",
    "time": "Fri May 15 13:54:57 2026 +0200"
  },
  "committer": {
    "name": "Marcin Kowalczyk",
    "email": "qrczak@google.com",
    "time": "Fri May 15 13:55:46 2026 +0200"
  },
  "message": "Optimize memory orders for weakly ordered architectures.\n\nIn `RefCount::Unref()`, `fetch_sub()` with `memory_order_release` rather than\n`memory_order_acq_rel`. Then, only in the unexpected path when this was the last\ndecrement (due to `IsUnique()` called before, this can happen only if another\nthread calls `Unref()` at the same time), `atomic_thread_fence()` with\n`memory_order_acquire`.\n\nThis removes the unnecessary acquire semantics from the expected path.\n\nIn `StableDependencyDefault::EnsureAllocatedSlow()`, `compare_exchange_strong()`\nwith a separate `memory_order_release` for the expected success path and\n`memory_order_acquire` for the unexpected failure path (which can happen only\nanother thread calls `EnsureAllocatd()` at the same time), instead of using\n`memory_order_acq_rel` for both.\n\nIn the unexpected path there is no change because `compare_exchange_strong()`\nimplicitly demotes `memory_order_acq_rel` to `memory_order_acquire` there.\nThis removes the unnecessary acquire semantics from the expected path.\n\nCosmetics: in `RefCount::{Ref,Unref}()`, replace `if` with `if constexpr`,\nand split a complex conditional into separate statements.\nPiperOrigin-RevId: 915941386\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "1551321bb37e2e22ef95c2627f28bcf1f28f00fc",
      "old_mode": 33188,
      "old_path": "riegeli/base/ref_count.h",
      "new_id": "1d2b0d9dc10a6972fab485a18d50436caa0e8bd1",
      "new_mode": 33188,
      "new_path": "riegeli/base/ref_count.h"
    },
    {
      "type": "modify",
      "old_id": "b0ae3b3b69b2b671a2339385b6c2b9aad6326d16",
      "old_mode": 33188,
      "old_path": "riegeli/base/stable_dependency.h",
      "new_id": "6add8a4f8dd75f4fcc99442180167953852d9fc4",
      "new_mode": 33188,
      "new_path": "riegeli/base/stable_dependency.h"
    }
  ]
}
