spreadlab/internal/engine
Justin Visser 91ce0c1ca5 engine: benchmark baseline (HolmeKim, RunScenario)
Manual baseline, not a CI gate: go test -bench=. -benchmem.
First numbers on a Ryzen 7 5800X: HolmeKim ~25us/op (48KB, 671
allocs), full RunScenario ~45us/op (78KB, 681 allocs). Plenty fast
until milestone 5 runs thousands of cascades per request; this is the
'before' picture for that work.
b.Loop() (Go 1.24+) replaces the old 'for i := 0; i < b.N; i++'
pattern and prevents the compiler optimising the loop body away.
2026-06-10 12:50:53 +02:00
..
bench_test.go engine: benchmark baseline (HolmeKim, RunScenario) 2026-06-10 12:50:53 +02:00
cascade.go engine: edge thresholds and the independent cascade 2026-06-10 12:08:12 +02:00
cascade_test.go engine: edge thresholds and the independent cascade 2026-06-10 12:08:12 +02:00
educate.go engine: education strategies (random vs most-connected) 2026-06-10 12:08:39 +02:00
educate_test.go engine: education strategies (random vs most-connected) 2026-06-10 12:08:39 +02:00
graph.go engine: undirected simple graph with deterministic neighbour order 2026-06-10 11:58:45 +02:00
graph_test.go engine: undirected simple graph with deterministic neighbour order 2026-06-10 11:58:45 +02:00
holmekim.go refactor engine: decompose Holme-Kim into builder methods 2026-06-10 12:37:57 +02:00
holmekim_test.go engine: Holme-Kim network generator (powerlaw_cluster_graph port) 2026-06-10 12:05:43 +02:00
rng.go engine: seeded RNG helper, first tests 2026-06-10 11:57:39 +02:00
rng_test.go engine: undirected simple graph with deterministic neighbour order 2026-06-10 11:58:45 +02:00
scenario.go refactor cmd: thin main, testable run(io.Writer), AllStrategies in engine 2026-06-10 12:39:03 +02:00
scenario_test.go engine: Config, scenario runner, golden regression tests; demo CLI 2026-06-10 12:24:47 +02:00