Closed NobodyXu closed 2 years ago
Thanks! Instead of performing a heap allocation though could this perhaps reserve a 128-byte buffer as as static
or const
and write that instead? I suspect most systems have <128 cores so it'll likely have the same effective effect.
Thanks! Instead of performing a heap allocation though could this perhaps reserve a 128-byte buffer as as
static
orconst
and write that instead? I suspect most systems have <128 cores so it'll likely have the same effective effect.
Done!
Oops, I accidentally closed it
Edit:
I just did it again.
Oh sorry but what I meant was that instead of having anything heap allocated this could instead still have a loop, but the loop is "chunked" into 128-bytes-at-a-time. So no need for vec!
, still a need for the loop, and most of the time only one trip through the loop will be taken.
Oh sorry but what I meant was that instead of having anything heap allocated this could instead still have a loop, but the loop is "chunked" into 128-bytes-at-a-time. So no need for
vec!
, still a need for the loop, and most of the time only one trip through the loop will be taken.
Got it, I will do that.
Oh sorry but what I meant was that instead of having anything heap allocated this could instead still have a loop, but the loop is "chunked" into 128-bytes-at-a-time. So no need for
vec!
, still a need for the loop, and most of the time only one trip through the loop will be taken.
Done!
And out of some mysterious reasons, my PR got closed again after I pushed my commits.
Can the
set_nonblocking
all happen withinClient::new
with comments as to what it's doing? Otherwise having it spread out across a few methods makes it harder to figure out what's going on.
Sure!
I was thinking about adding O_NONBLOCK
to pipe2
, that's why I added it to `mk.
Can the
set_nonblocking
all happen withinClient::new
with comments as to what it's doing? Otherwise having it spread out across a few methods makes it harder to figure out what's going on.
Done!
Signed-off-by: Jiahao XU Jiahao_XU@outlook.com