CPU scaling benchmark

workers
6 +1 main
iters total
500M
71428571/stream
elapsed
1139.34 ms
total CPU used
7108.82 ms
speedup
6.24×
vs serial
efficiency
89.1%
of 7× ideal
stream spawn ms spawned@ work start@ work end@ work ms reap wait ms
0 (main) 0 14.01 14.02 1123.16 1109.14 0
1 1.976 1.99 16.47 969.86 953.39 0.11
2 1.732 3.75 21.22 881.41 860.19 0.18
3 1.723 5.49 23.67 1133.7 1110.03 10.69
4 3.353 8.86 33.4 988.12 954.72 0.19
5 3.12 11.99 50.65 1136.66 1086.01 13.59
6 1.995 14 56.79 1092.13 1035.34 0.2
main
w1
w2
w3
w4
w5
w6
    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.