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-89279: In ceval.c, redefine some macros for speed #32387

Merged
merged 27 commits into from
Apr 22, 2022

Commits on Apr 6, 2022

  1. Configuration menu
    Copy the full SHA
    0be9d62 View commit details
    Browse the repository at this point in the history

Commits on Apr 7, 2022

  1. In ceval.c, redefine some macros for speed

    In particular, Py_DECREF, Py_XDECREF and Py_IS_TYPE are redefined as macros
    that completely replace the inline functions of the same name.
    These three came out in the top four of functions that (in MSVC)
    somehow weren't inlined.
    (There was another, _Py_atomic_load_32bit_impl, but it is more difficult.)
    gvanrossum committed Apr 7, 2022
    Configuration menu
    Copy the full SHA
    abd9118 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1724056 View commit details
    Browse the repository at this point in the history
  3. Victor's review

    gvanrossum committed Apr 7, 2022
    Configuration menu
    Copy the full SHA
    50e3d7b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    59da3bf View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ab6660e View commit details
    Browse the repository at this point in the history
  6. Move _Py_atomic_load_32bit_impl out of '#if'

    So that the assert() in the macro will be checked in debug mode.
    gvanrossum committed Apr 7, 2022
    Configuration menu
    Copy the full SHA
    ae6b53c View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2022

  1. Configuration menu
    Copy the full SHA
    01cff81 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    69da380 View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2022

  1. Configuration menu
    Copy the full SHA
    2894f6e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4b70976 View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2022

  1. Configuration menu
    Copy the full SHA
    5617fcd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a901b91 View commit details
    Browse the repository at this point in the history

Commits on Apr 13, 2022

  1. Configuration menu
    Copy the full SHA
    cceb531 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    26e8107 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    11084c0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b7dfcdc View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2022

  1. Use static_assert() in _Py_atomic_load_relaxed_int32

    Co-authored-by: Victor Stinner <vstinner@python.org>
    gvanrossum and vstinner authored Apr 19, 2022
    Configuration menu
    Copy the full SHA
    9a5c57c View commit details
    Browse the repository at this point in the history
  2. Revert "MSC is better off with the default Py_UNREACHABLE()"

    The evidence that `__assume(0)` is harmful is unclear and at best
    seems to only apply to the x86 platform (i.e., 32-bit), which we
    care about less and less.  So revert this change.
    
    This reverts commit 5617fcd.
    gvanrossum committed Apr 19, 2022
    Configuration menu
    Copy the full SHA
    a8cba6e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c43ec56 View commit details
    Browse the repository at this point in the history
  4. static_assert() is only a C++ feature

    In GCC there's _Static_assert(), but MSVC only has _STATIC_ASSERT
    and that requires crtdbg.h. I don't think it's worth the hassle.
    
    Revert "Use static_assert() in _Py_atomic_load_relaxed_int32"
    
    This reverts commit 9a5c57c.
    gvanrossum committed Apr 19, 2022
    Configuration menu
    Copy the full SHA
    9a15194 View commit details
    Browse the repository at this point in the history

Commits on Apr 20, 2022

  1. Configuration menu
    Copy the full SHA
    5c992d2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7b342e4 View commit details
    Browse the repository at this point in the history

Commits on Apr 21, 2022

  1. Reformat macros for readability

    Co-authored-by: Victor Stinner <vstinner@python.org>
    gvanrossum and vstinner authored Apr 21, 2022
    Configuration menu
    Copy the full SHA
    3b21c52 View commit details
    Browse the repository at this point in the history
  2. Try to silence warnings

    Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
    gvanrossum and sweeneyde authored Apr 21, 2022
    Configuration menu
    Copy the full SHA
    41cb067 View commit details
    Browse the repository at this point in the history
  3. Update Python/ceval.c

    vstinner authored Apr 21, 2022
    Configuration menu
    Copy the full SHA
    87aaf81 View commit details
    Browse the repository at this point in the history
  4. Update Python/ceval.c

    vstinner authored Apr 21, 2022
    Configuration menu
    Copy the full SHA
    3508f45 View commit details
    Browse the repository at this point in the history