Skip to content

[GR-77797] Avoid upcall in PyTuple_Size.#1034

Merged
graalvmbot merged 3 commits into
masterfrom
fa/GR-77797/avoid_upcall_PyTuple_Size
Jul 22, 2026
Merged

[GR-77797] Avoid upcall in PyTuple_Size.#1034
graalvmbot merged 3 commits into
masterfrom
fa/GR-77797/avoid_upcall_PyTuple_Size

Conversation

@graalvmbot

Copy link
Copy Markdown
Collaborator

Managed and native tuples always have the size available in native. We already leverage this in macro Py_SIZE (via GraalPy_SIZE) but PyTuple_Size always does an upcall and is very bad for native tuples. However, in that case we could do even better because we already know the type and can avoid the type check as well.

@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jul 22, 2026
@graalvmbot graalvmbot closed this Jul 22, 2026
@graalvmbot
graalvmbot merged commit 4b28db0 into master Jul 22, 2026
10 of 11 checks passed
@graalvmbot
graalvmbot deleted the fa/GR-77797/avoid_upcall_PyTuple_Size branch July 22, 2026 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants