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

AssignAndPushReferenceValue peephole opt #2047

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ike709
Copy link
Collaborator

@ike709 ike709 commented Oct 19, 2024

When AssignPop is followed by PushReferenceValue and they both have the same reference, they're reduced to a single Assign with a new AssignAndPushReferenceValue optimization. This saves about ~17,000 redundant ReadReference() and GetReferenceValue() calls in TG bytecode.

@boring-cyborg boring-cyborg bot added Compiler Involves the OpenDream compiler Runtime Involves the OpenDream server/runtime labels Oct 19, 2024
@ZeWaka
Copy link
Collaborator

ZeWaka commented Oct 20, 2024

title and desc incorrect

@ike709
Copy link
Collaborator Author

ike709 commented Oct 20, 2024

waka lacking reading comprehension moment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compiler Involves the OpenDream compiler Runtime Involves the OpenDream server/runtime size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants