`stdin` and `stdout` performance considerations are not documented

Location

Summary

It is a common performance pitfall for newcomers to write to stdin or stdout like they would in other languages:

io::stdout().write_all(b"hello world")?;

However, this acquires a lock on every access, and the naive version slow if such writes are done frequently. A faster version looks like this:

    let stdout = io::stdout();
    let mut handle = stdout.lock();
    handle.write_all(b"hello world")?;

All pages linked do provide this example code, but do not explain why this more verbose version is beneficial, instead simply titling it "Using explicit synchronization:". None of these pages mention performance at all.

The relation of stdout to buffering is not documented. Does and stdout need to be wrapped into BufReader? What about the explicitly locked version? Locked stdin is documented to provide BufReader methods, but again there is no mention of performance.