CPU scaling benchmark

workers
3 +1 main
iters total
500M
125000000/stream
elapsed
1140.32 ms
total CPU used
4392.52 ms
speedup
3.85×
vs serial
efficiency
96.3%
of 4× ideal
stream spawn ms spawned@ work start@ work end@ work ms reap wait ms
0 (main) 0 5.12 5.13 1088.62 1083.49 0
1 1.996 2.01 14.62 1104.87 1090.25 16.39
2 1.526 3.56 15.7 1114.13 1098.43 25.63
3 1.532 5.11 16.86 1137.21 1120.35 48.73
main
w1
w2
w3
    fork+handshake      CPU work      parent reap wait
what this measures
Each stream runs a tight integer LCG loop — working set is one CPU register, no memory access, no shared data. Speedup = sum(stream CPU time) / wall-clock elapsed. Efficiency = speedup / (workers+1). 100% efficiency means perfect linear scaling; less than 100% is the cost of serial fork setup, reap tail, SMT/core contention.