Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-110481: Implement biased reference counting #110764

Merged
merged 8 commits into from
Oct 30, 2023

Commits on Oct 30, 2023

  1. Remove trailing commas in _PyObject_HEAD_INIT and _PyVarObject_HEAD_INIT

    Removing the trailing comma allows the macros to be used in more places,
    which means fewer `#ifdef Py_NOGIL` checks.
    
    Note that the public API macros `PyObject_HEAD_INIT` and
    `PyVarObject_HEAD_INIT` are not changed.
    colesbury authored and corona10 committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    94bfbde View commit details
    Browse the repository at this point in the history
  2. Implement biased reference counting

    colesbury authored and corona10 committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    b1cb396 View commit details
    Browse the repository at this point in the history
  3. Add blurb

    colesbury authored and corona10 committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    425d570 View commit details
    Browse the repository at this point in the history
  4. Changes from review:

     - _Py_ThreadLocal -> _Py_IsOnwedByCurrentThread
     - Add _Py_UNOWNED_TID macro define
     - _Py_MergeZeroRefcount -> Py_MergeZeroLocalRefcount
     - Add assertion to _Py_ExplicitMergeRefcount
    colesbury authored and corona10 committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    8c68c78 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    86892d9 View commit details
    Browse the repository at this point in the history
  6. Fix typo

    colesbury authored and corona10 committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    3c85ca1 View commit details
    Browse the repository at this point in the history
  7. Add missing guards

    colesbury authored and corona10 committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    c6c6ec6 View commit details
    Browse the repository at this point in the history
  8. Add TODOs for missing Py_DECREF specializations

    These aren't necessary for correctness, just performance.
    colesbury authored and corona10 committed Oct 30, 2023
    Configuration menu
    Copy the full SHA
    ac2c957 View commit details
    Browse the repository at this point in the history