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
[Merged by Bors] - No string in slog #2017
[Merged by Bors] - No string in slog #2017
Conversation
btw, just to be sure before the repetitive task of find replace, the assembly of fn main() {
let x = "x";
println!("{}", x);
} is 100 lines long, fn main() {
let x = "x";
println!("{}", &x.to_string());
} is 150 lines long. So I assume this is an optimization the compiler / llvm does not do, so it's worth the "extra" effort of using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
bors r+ |
## Issue Addressed Following slog's documentation, this should help a bit with string allocations. I left it run for two days and mem usage is lower. This is of course anecdotal, but shouldn't harm anyway ## Proposed Changes remove `String` creation in logs when possible
bors retry? this doesn't seem related |
🔒 Permission denied Existing reviewers: click here to make divagant-martian a reviewer |
Pull request successfully merged into unstable. Build succeeded: |
Issue Addressed
Following slog's documentation, this should help a bit with string allocations. I left it run for two days and mem usage is lower. This is of course anecdotal, but shouldn't harm anyway
Proposed Changes
remove
String
creation in logs when possible