Skip to content

Let the caller copy params if necessary instead of the callee #691

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

Closed
bjorn3 opened this issue Aug 28, 2019 · 0 comments
Closed

Let the caller copy params if necessary instead of the callee #691

bjorn3 opened this issue Aug 28, 2019 · 0 comments
Labels
optimize-speed The speed of the generated executable

Comments

@bjorn3
Copy link
Member

bjorn3 commented Aug 28, 2019

Currently the callee has to copy params passed by-ref to its own stack slot, even when the caller doesn't use the value afterwards. By letting the caller perform the copying if necessary, the callee can just use the value in place without copy.

@bjorn3 bjorn3 added the optimize-speed The speed of the generated executable label Aug 28, 2019
bjorn3 added a commit that referenced this issue Aug 30, 2019
Eg when the local is immutable **and** the type is freeze.

This makes the simple raytracer runtime benchmark 1% faster than cg_llvm
without optimizations. Before it was 2% slower.

cc #691
cc #684
@bjorn3 bjorn3 closed this as completed in e387ec9 Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
optimize-speed The speed of the generated executable
Projects
None yet
Development

No branches or pull requests

1 participant