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

ReturnFloat peephole optimization #2049

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

ike709
Copy link
Collaborator

@ike709 ike709 commented Oct 20, 2024

PushFloat -> Return is a common pattern in TG with 21,601 occurrences. This is mainly due to procs returning TRUE or FALSE.

This PR replaces that pattern with a new ReturnFloat opcode to avoid pushing to and immediately popping from the stack on all of those proc returns.

@boring-cyborg boring-cyborg bot added Compiler Involves the OpenDream compiler Runtime Involves the OpenDream server/runtime labels Oct 20, 2024
@LemonInTheDark
Copy link
Contributor

😳

@wixoaGit wixoaGit merged commit 2d93944 into OpenDreamProject:master Oct 22, 2024
7 checks passed
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/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants