| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
The following commit authors need to sign the Contributor License Agreement: |
Sorry, something went wrong.
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead. |
Sorry, something went wrong.
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes: #144529
Summary
This PR replaces PyTuple_Pack with PyTuple_FromArray in Objects/dictobject.c for creating small tuples (size 2).
PyTuple_FromArray is more efficient than PyTuple_Pack because it avoids the overhead of variadic arguments (va_args) processing by taking a pointer to a pre-allocated array of PyObject*.
Changes
Performance Impact
This is part of a general effort to optimize small tuple creation across the codebase. Replacing PyTuple_Pack with PyTuple_FromArray for small, fixed-size tuples reduces call overhead.