-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Add comments about stdout locking #99742
Conversation
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @kennytm (or someone else) soon. Please see the contribution instructions for more information. |
Looks good. Sorry for the delay. @bors r+ rollup |
Add comments about stdout locking This is the source of some confusion regarding the `println!` macro: * https://llogiq.github.io/2017/06/01/perf-pitfalls.html#unbuffered-io * https://news.ycombinator.com/item?id=18794930 * https://reddit.com/r/rust/comments/5puyx2/why_is_println_so_slow/dcua5g5/ * https://reddit.com/r/rust/comments/ab7hsi/comparing_pythagorean_triples_in_c_d_and_rust/ecy7ql8/ In some of these cases it's not the locking behavior where the bottleneck lies, but it's still mentioned as a surprise when, eg, benchmarking a million `println!`'s in a very tight loop. If there's any stylistic problems please feel free to correct me! This is my first contribution and I want to get it right 🦀
Add comments about stdout locking This is the source of some confusion regarding the `println!` macro: * https://llogiq.github.io/2017/06/01/perf-pitfalls.html#unbuffered-io * https://news.ycombinator.com/item?id=18794930 * https://reddit.com/r/rust/comments/5puyx2/why_is_println_so_slow/dcua5g5/ * https://reddit.com/r/rust/comments/ab7hsi/comparing_pythagorean_triples_in_c_d_and_rust/ecy7ql8/ In some of these cases it's not the locking behavior where the bottleneck lies, but it's still mentioned as a surprise when, eg, benchmarking a million `println!`'s in a very tight loop. If there's any stylistic problems please feel free to correct me! This is my first contribution and I want to get it right 🦀
Add comments about stdout locking This is the source of some confusion regarding the `println!` macro: * https://llogiq.github.io/2017/06/01/perf-pitfalls.html#unbuffered-io * https://news.ycombinator.com/item?id=18794930 * https://reddit.com/r/rust/comments/5puyx2/why_is_println_so_slow/dcua5g5/ * https://reddit.com/r/rust/comments/ab7hsi/comparing_pythagorean_triples_in_c_d_and_rust/ecy7ql8/ In some of these cases it's not the locking behavior where the bottleneck lies, but it's still mentioned as a surprise when, eg, benchmarking a million `println!`'s in a very tight loop. If there's any stylistic problems please feel free to correct me! This is my first contribution and I want to get it right 🦀
…llaumeGomez Rollup of 8 pull requests Successful merges: - rust-lang#95005 (BTree: evaluate static type-related check at compile time) - rust-lang#99742 (Add comments about stdout locking) - rust-lang#100128 (Document that `RawWakerVTable` functions must be thread-safe.) - rust-lang#100956 (Reduce right-side DOM size) - rust-lang#101006 (Fix doc cfg on reexports) - rust-lang#101012 (rustdoc: remove unused CSS for `.variants_table`) - rust-lang#101023 (rustdoc: remove `type="text/css"` from stylesheet links) - rust-lang#101031 (Remove unused build dependency) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This is the source of some confusion regarding the
println!
macro:In some of these cases it's not the locking behavior where the bottleneck lies, but it's still mentioned as a surprise when, eg, benchmarking a million
println!
's in a very tight loop.If there's any stylistic problems please feel free to correct me! This is my first contribution and I want to get it right 🦀