FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[WIP] bpo-45490: Convert static inline to macros by vstinner · Pull Request #29728 · python/cpython · GitHub

Repository navigation

[WIP] bpo-45490: Convert static inline to macros - #29728

Closed
vstinner wants to merge 1 commit into
python:mainfrom
vstinner:bench_macro
Closed

vstinner wants to merge 1 commit into
python:mainfrom
vstinner:bench_macro

Conversation

vstinner commented Nov 23, 2021 •
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

Convert static inline functions to macros to run a benchmark:

  • PyObject_TypeCheck()
  • PyType_Check()
  • PyType_CheckExact()
  • PyType_HasFeature()
  • PyVectorcall_NARGS()
  • Py_DECREF()
  • Py_INCREF()
  • Py_IS_TYPE()
  • Py_NewRef()
  • Py_REFCNT()
  • Py_SIZE()
  • Py_TYPE()
  • Py_XDECREF()
  • Py_XINCREF()

Note: Py_XNewRef() remains a static inline function.

https://bugs.python.org/issue45490

Copy link
Copy Markdown
Member Author

PR created to run benchmarks comparing static inline functions and macros for the PEP 670: https://www.python.org/dev/peps/pep-0670/

Convert static inline functions to macros to run a benchmark:

* PyObject_TypeCheck()
* PyType_Check()
* PyType_CheckExact()
* PyType_HasFeature()
* PyVectorcall_NARGS()
* Py_DECREF()
* Py_INCREF()
* Py_IS_TYPE()
* Py_NewRef()
* Py_REFCNT()
* Py_SIZE()
* Py_TYPE()
* Py_XDECREF()
* Py_XINCREF()

Note: Py_XNewRef() remains a static inline function.

Copy link
Copy Markdown
Member Author

"Check if generated files are up to date" CI test failed with:

Some extra declarations were found in "Include/Python.h" with Py_LIMITED_API:
 - _PyDebug_PrintTotalRefs

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

github-actions Bot added the stale Stale PR or inactive for long period of time. label Dec 24, 2021
vstinner closed this Feb 23, 2022
vstinner deleted the bench_macro branch February 23, 2022 23:19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review DO-NOT-MERGE stale Stale PR or inactive for long period of time.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL