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-100146: Steal references from stack when building a list #100147

Merged
merged 1 commit into from
Jan 3, 2023

Commits on Dec 9, 2022

  1. pythongh-100146: Steal references from stack when building a list

    When executing the BUILD_LIST opcode, steal the references from the stack,
    in a manner similar to the BUILD_TUPLE opcode.  Implement this by offloading
    the logic to a new private API, _PyList_FromArraySteal(), that works similarly
    to _PyTuple_FromArraySteal().
    
    This way, instead of performing multiple stack pointer adjustments while the
    list is being initialized, the stack is adjusted only once and a fast memory
    copy operation is performed in one fell swoop.
    lpereira committed Dec 9, 2022
    Configuration menu
    Copy the full SHA
    9379cd4 View commit details
    Browse the repository at this point in the history