
Issue #19642 has been updated by tenderlovemaking (Aaron Patterson). I understand the concern of copying the `iovec`, but it seems like the overhead of making N calls to `write` would at some point be more expensive than copying the struct once. I guess under the hood `writev` may just be calling `write`, in which case copying the struct doesn't make sense. This patch simplifies the code, so if there's no significant perf difference then it seems fine to me. 😃 ---------------------------------------- Feature #19642: Remove vectored read/write from `io.c`. https://bugs.ruby-lang.org/issues/19642#change-103145 * Author: ioquatix (Samuel Williams) * Status: Open * Priority: Normal * Assignee: ioquatix (Samuel Williams) ---------------------------------------- https://github.com/socketry/async/issues/228#issuecomment-1546789910 is a comment from the kernel developer who tells us that `writev` is always worse than `write` system call. A large amount of complexity in `io.c` comes from optional support from `writev`. So, I'd like to remove support for `writev`. I may try to measure the performance before/after. However it may not show much difference, except that the implementation in `io.c` can be much simpler. -- https://bugs.ruby-lang.org/