Title: Improve performance by replacing PyTuple_Pack with PyTuple_FromArray · Issue #140009 · python/cpython · GitHub
Open Graph Title: Improve performance by replacing PyTuple_Pack with PyTuple_FromArray · Issue #140009 · python/cpython
X Title: Improve performance by replacing PyTuple_Pack with PyTuple_FromArray · Issue #140009 · python/cpython
Description: Feature or enhancement Proposal: The PyTuple_Pack method is relatively slow because it is a variadic function. For various cases (in particular tuples of size 1 and 2) we can replace PyTuple_Pack with PyTuple_FromArray (introduced in #11...
Open Graph Description: Feature or enhancement Proposal: The PyTuple_Pack method is relatively slow because it is a variadic function. For various cases (in particular tuples of size 1 and 2) we can replace PyTuple_Pack w...
X Description: Feature or enhancement Proposal: The PyTuple_Pack method is relatively slow because it is a variadic function. For various cases (in particular tuples of size 1 and 2) we can replace PyTuple_Pack w...
Opengraph URL: https://github.com/python/cpython/issues/140009
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Improve performance by replacing PyTuple_Pack with PyTuple_FromArray","articleBody":"# Feature or enhancement\n\n### Proposal:\n\nThe ` PyTuple_Pack` method is relatively slow because it is a variadic function. For various cases (in particular tuples of size 1 and 2) we can replace `PyTuple_Pack` with `PyTuple_FromArray` (introduced in https://github.com/python/cpython/issues/111489)\n\n### Has this already been discussed elsewhere?\n\nNo response given\n\n### Links to previous discussion of this feature:\n\n_No response_\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-140010\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/eendebakpt","@type":"Person","name":"eendebakpt"},"datePublished":"2025-10-12T18:20:16.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/140009/cpython/issues/140009"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:45e0e9bb-58d2-8bef-025d-88fe18532a9e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 95A6:FC316:2942585:3647106:696B2838 |
| html-safe-nonce | d87f1aea3a58320ec2ffa7d5383c50298651399f59344e1947985295d5cd11e2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NUE2OkZDMzE2OjI5NDI1ODU6MzY0NzEwNjo2OTZCMjgzOCIsInZpc2l0b3JfaWQiOiI0MTQ2MzE3MjU1NTg4MzkwOTY4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 225e6b2a7b7c74ebc3ea088f328d8d227b602aea7d5c56a71d88a2c6c061051e |
| hovercard-subject-tag | issue:3507668693 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/140009/issue_layout |
| twitter:image | https://opengraph.githubassets.com/04ddcf8f3343229ff5e972ba43c01388bcb463db457c4e66a96701b48bdc6190/python/cpython/issues/140009 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/04ddcf8f3343229ff5e972ba43c01388bcb463db457c4e66a96701b48bdc6190/python/cpython/issues/140009 |
| og:image:alt | Feature or enhancement Proposal: The PyTuple_Pack method is relatively slow because it is a variadic function. For various cases (in particular tuples of size 1 and 2) we can replace PyTuple_Pack w... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | eendebakpt |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width