iggy icon indicating copy to clipboard operation
iggy copied to clipboard

Use write_vectored to replace write_all

Open YHM404 opened this issue 1 year ago • 1 comments

Perhaps trying to use write_vectored instead of write_all to reduce memory copying and system call overhead can improve the performance.

YHM404 avatar Jan 30 '24 17:01 YHM404

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]>

YHM404 avatar Jan 30 '24 17:01 YHM404