Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Reuse objects with refcount == 1 in specialized instructions #102300

Closed
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usage
@markshannon

Description

@markshannon

Many VM instructions consume references to their operands and produce a reference to a result, often of the same type.
For some of those, we specialize for common types.

We can speed up the operations by reusing one of the operands if the refcount is one.
For example, inBINARY_OP_ADD_FLOAT if the refcount of the left operand is one, we can do the operation in place.
This is effectively free as we need to check the refcount of the operands inPy_DECREF() anyway.

We have attempted doing this in the past, but got bogged down trying to merge the operation and the following store.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usage

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp