)]}'
{
  "commit": "c98182be8d47a69b9a43c08f58bac7a70c109cc9",
  "tree": "056dfe03525cc312ce2f724066f86ab96caadd3f",
  "parents": [
    "3e36d375352632be85b9ac3a0eeb075a4e03ef6f"
  ],
  "author": {
    "name": "Neil Schemenauer",
    "email": "nas-github@arctrix.com",
    "time": "Sat Dec 13 09:50:23 2025"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Sat Dec 13 09:50:23 2025"
  },
  "message": "gh-132657: Add lock-free set contains implementation (#132290)\n\nThis roughly follows what was done for dictobject to make a lock-free\nlookup operation. With this change, the set contains operation scales much\nbetter when used from multiple-threads. The frozenset contains performance\nseems unchanged (as already lock-free).\n\nSummary of changes:\n\n* refactor set_lookkey() into set_do_lookup() which now takes a function\n  pointer that does the entry comparison. This is similar to dictobject and\n  do_lookup(). In an optimized build, the comparison function is inlined and\n  there should be no performance cost to this.\n\n* change set_do_lookup() to return a status separately from the entry value\n\n* add set_compare_frozenset() and use if the object is a frozenset. For the\n  free-threaded build, this avoids some overhead (locking, atomic operations,\n  incref/decref on key)\n\n* use FT_ATOMIC_* macros as needed for atomic loads and stores\n\n* use a deferred free on the set table array, if shared (only on free-threaded\n  build, normal build always does an immediate free)\n\n* for free-threaded build, use explicit for loop to zero the table, rather than memcpy()\n\n* when mutating the set, assign so-\u003etable to NULL while the change is a\n  happening. Assign the real table array after the change is done.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "817c0763bf899bcf6a7c4fb8f5ede6ac1ddfbe8c",
      "old_mode": 33188,
      "old_path": "Include/internal/pycore_pyatomic_ft_wrappers.h",
      "new_id": "1a6d5075361f3c173a83828ae1522549c08e9e07",
      "new_mode": 33188,
      "new_path": "Include/internal/pycore_pyatomic_ft_wrappers.h"
    },
    {
      "type": "modify",
      "old_id": "a66e03bcc4c9d12b0711e51993b1da85ac7c7be8",
      "old_mode": 33188,
      "old_path": "Lib/test/test_free_threading/test_set.py",
      "new_id": "251020319b20f3a3edc3c723864ee3e462fc9b4a",
      "new_mode": 33188,
      "new_path": "Lib/test/test_free_threading/test_set.py"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "2709932932715864adbcf88d08e26624cb4476bc",
      "new_mode": 33188,
      "new_path": "Misc/NEWS.d/next/Core_and_Builtins/2025-07-11-19-57-27.gh-issue-132657.vwDuO2.rst"
    },
    {
      "type": "modify",
      "old_id": "488be4435f81d74497e02d617b37b226372ac3bd",
      "old_mode": 33188,
      "old_path": "Objects/clinic/setobject.c.h",
      "new_id": "098c4bcb53d3fb1508995a97879568c70107ae8f",
      "new_mode": 33188,
      "new_path": "Objects/clinic/setobject.c.h"
    },
    {
      "type": "modify",
      "old_id": "85f4d7d403178adbeb53bace11b41861eeb9f7f3",
      "old_mode": 33188,
      "old_path": "Objects/setobject.c",
      "new_id": "2c585da1c43a78195232c4ef33d387ad034c9adc",
      "new_mode": 33188,
      "new_path": "Objects/setobject.c"
    }
  ]
}
