-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Inefficient codegen for function returning String #34861
Comments
pub fn goo() -> String { Gives: so it looks like this is just rust-lang/rfcs#788 |
Perhaps #32966 is more appropriate dup of this. |
This is indeed fixed with panic=abort in nightly. I suspect it was fixed by #44992 |
I filed #45499 about the missing tail calls. |
The following code seems generate inefficient code compared to the C++ equivalent:
gives:
vs.
The rust code has an additional alloca and a memcpy
The text was updated successfully, but these errors were encountered: