From 56d6876f906f91db9f48f0f27b7f456ee601efd9 Mon Sep 17 00:00:00 2001 From: eunhhu Date: Tue, 29 Sep 2026 15:26:30 +0100 Subject: Cut what a small record costs a link: no division a record, no walk a delivery Profiling both sides in one thread, without sockets (61-byte records): the rings of records and flights divided for each place, the record a number names was found three times over, a record in one part was searched for its part, and the receiver walked the line record by record to hand it over and again to let it go. The rings are powers of two long and now masked; a record is found once; a one-part record's part is the first; a line of a batch or less goes whole without a walk, and a delivery applied whole lets its bytes go at once. The protocol alone: 0.171 to 0.162 us a record. M5 (the link and listener threads, sockets too), five rounds against the commit before: 61 B 0.298 to 0.287 us, 1 KiB 2.63-2.90 to 2.48-2.79 us, 16 KiB the same or less; quinn measured 0.31, 3.85 and 60 us in the same rounds. test-link's results are the same to the byte. --- link/link-protocol.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'link/link-protocol.h') diff --git a/link/link-protocol.h b/link/link-protocol.h index 16fd683..e7ca38c 100644 --- a/link/link-protocol.h +++ b/link/link-protocol.h @@ -187,7 +187,7 @@ typedef struct { const char *source; uint64_t first; unsigned count; - const unsigned char *records; /* count of: u32le size, bytes */ + const unsigned char *records; /* count of: u32le size, bytes (the receiver's: the host's during the call) */ size_t size; void *token; /* for its done */ } PureLinkDelivery; -- cgit v1.2.3