Following https://github.com/rust-lang/rust/issues/60673, it might be faster to write to fd 1/2 directly, skipping the mutex and line buffering.