4 ms·
BufWriter provides a default capacity of 8 KB. Rather than perform repeated syscalls to write to the stdout fd, this will syscall on flush https://doc.rust-lang
by nyxtom 4y ago
BufWriter provides a default capacity of 8 KB. Rather than perform repeated syscalls to write to the stdout fd, this will syscall on flush https://doc.rust-lang.org/std/io/struct.BufWriter.html https://doc.rust-lang.org/std/io/struct.BufWriter.html
Also, for loops desugar to into_iter, but the extra closure does provide an additional bump https://doc.rust-lang.org/book/ch13-04-performance.html https://doc.rust-lang.org/book/ch13-04-performance.html