In #89165 I updated `Read::read_to_end` to try to detect EOF when the input buffer is full by reading into a small "probe" buffer. If that read returns `Ok(0)` then it avoids unnecessarily doubling the capacity of the input buffer. > I think there'd be some value in trying to eliminate even the "probe buffer" call, but in the meantime, this seems like an improvement. _Originally posted by @joshtriplett in https://github.com/rust-lang/rust/issues/89165#issuecomment-933081857_ Josh, did you have something in mind? I thought a way: use [`read_vectored`](https://doc.rust-lang.org/std/io/trait.Read.html#method.read_vectored). I could add the probe buffer to a vectorized `readv`, which would eliminate the extra `read` syscall. 1. Is that idea worth pursuing? 2. Is it okay to simply switch the `read` call(s) to `read_vectored`, or would it be better to check [`is_read_vectored`](https://doc.rust-lang.org/std/io/trait.Read.html#method.is_read_vectored) and have separate vectorized and non-vectorized code paths? I'm inclined to keep it simple and do the former.