KEMBAR78
[mypyc] Borrow even more things by JukkaL · Pull Request #12817 · python/mypy · GitHub
Skip to content

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented May 19, 2022

Borrow operands of tagged integer operations to reduce the number of
incref/decref operations (when it's safe to do so).

Borrow the results in list get item operations, similar to what we've been
doing with get attribute operations.

@97littleleaf11 97littleleaf11 self-requested a review May 20, 2022 02:24
Borrowing means keeping a reference without incrementing the reference count.
"""
if isinstance(expr, (IntExpr, FloatExpr, StrExpr, BytesExpr)):
# Literals are immportal and can always be borrowed
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo?

@JukkaL JukkaL merged commit 3c04092 into master May 23, 2022
@JukkaL JukkaL deleted the mypyc-refcount-more branch May 23, 2022 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants