aboutsummaryrefslogtreecommitdiffstats
path: root/research/experiments/028-one-sending-loop/src.aup
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-10-01 09:00:49 +0100
committereunhhu <[email protected]>2026-10-01 09:00:49 +0100
commit2128089d94a9a7345775e2725347713a66987039 (patch)
tree3b22cd8dc5d08a0ced9e61a6367647215c784231 /research/experiments/028-one-sending-loop/src.aup
parent50f8ea3c249009fcbe649561e7aba32580bab454 (diff)
downloadpure-2128089d94a9a7345775e2725347713a66987039.tar.gz
pure-2128089d94a9a7345775e2725347713a66987039.zip
Measure one sending loop against a thread a link, with and without push (028)
Five rounds of 1,000 bursts by one link, four links and one wire, four builds in turns: a thread a link (966b82f), those threads with push (threads-push.patch), the loop (99b2219), the loop with push (94e7bb8). Medians: one link 597k, 923k, 525k, 897k sends/s; four links 506k, 799k, 268k, 800k; the wire as it was, 789k to 794k.
Diffstat (limited to 'research/experiments/028-one-sending-loop/src.aup')
-rw-r--r--research/experiments/028-one-sending-loop/src.aup29
1 files changed, 29 insertions, 0 deletions
diff --git a/research/experiments/028-one-sending-loop/src.aup b/research/experiments/028-one-sending-loop/src.aup
new file mode 100644
index 0000000..6bb9c42
--- /dev/null
+++ b/research/experiments/028-one-sending-loop/src.aup
@@ -0,0 +1,29 @@
+record Item {
+ k = 0
+}
+state items: list of Item
+input fill = message { k: u32 }
+input burst = message { step: u32 }
+input burst4 = message { step: u32 }
+output out = message { k: u32 }
+output o1 = message { k: u32 }
+output o2 = message { k: u32 }
+output o3 = message { k: u32 }
+output o4 = message { k: u32 }
+on fill {
+ items.append(Item { k: fill.k })
+}
+on burst {
+ for i in items {
+ send out { k: i.k + burst.step }
+ }
+}
+on burst4 {
+ for i in items {
+ send o1 { k: i.k + burst4.step }
+ send o2 { k: i.k + burst4.step }
+ send o3 { k: i.k + burst4.step }
+ send o4 { k: i.k + burst4.step }
+ }
+}
+view count = count(i in items where i.k > 0)