From aa1c8597ef5ca81ae466ca7d8fe35d903cf78e97 Mon Sep 17 00:00:00 2001 From: eunhhu Date: Sun, 4 Oct 2026 17:39:18 +0100 Subject: Wait for a counter before searching in bfs-run, and the runs of research 121 --- research/experiments/036-faster-loops/bfs-run.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'research/experiments/036-faster-loops/bfs-run.c') diff --git a/research/experiments/036-faster-loops/bfs-run.c b/research/experiments/036-faster-loops/bfs-run.c index a3d9d79..4d5ca82 100644 --- a/research/experiments/036-faster-loops/bfs-run.c +++ b/research/experiments/036-faster-loops/bfs-run.c @@ -61,6 +61,11 @@ int main(int argc, char **argv) { return 1; } } + if (getenv("BFS_WAIT")) { /* loaded: a counter attaches, then a line on stdin starts the searches */ + fprintf(stderr, "loaded\n"); + fflush(stderr); + (void)getchar(); + } double *took = malloc(rounds * sizeof(*took)); for (size_t r = 0; r < rounds; ++r) { uint32_t from = (uint32_t)(next() % nodes), to = (uint32_t)(next() % nodes); -- cgit v1.2.3