iggy
iggy copied to clipboard
Use write_vectored to replace write_all
Perhaps trying to use write_vectored instead of write_all to reduce memory copying and system call overhead can improve the performance.
I will try this approach, but maybe the catch is to modify various interfaces.
Such as:
fn write(bytes: &[u8])
into:
fn write_vectored(bytes: &[u8])
and
fn as_bytes() -> &[u8]
into
fn as_bytes_vec() -> Vec<&[u8]>