This is an archive of the discontinued LLVM Phabricator instance.

[libc] More efficiently send bytes via `send_n` and `recv_n`
ClosedPublic

Authored by jhuber6 on May 20 2023, 6:29 PM.

Details

Summary

Currently we have the send_n and recv_n routines to stream data,
such as a string to print, to the other side. The first operation is to
send the size so the other side knows the number of bytes to recieve.
However, this wasted 56 bytes that could've been sent. This meant that
small values, like the arguments to a function to call on the host for
example, needed to perform an extra send. This patch sends the first 56
bytes in the first packet and continues if necessary.

Depends on D150992

Diff Detail

Event Timeline

jhuber6 created this revision.May 20 2023, 6:29 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMay 20 2023, 6:29 PM
jhuber6 requested review of this revision.May 20 2023, 6:29 PM
JonChesterfield accepted this revision.May 23 2023, 8:37 AM

Seems reasonable, thanks

This revision is now accepted and ready to land.May 23 2023, 8:37 AM
This revision was landed with ongoing or failed builds.May 23 2023, 9:00 AM
This revision was automatically updated to reflect the committed changes.