CPU scaling benchmark

workers
6 +1 main
iters total
500M
71428571/stream
elapsed
1178.63 ms
total CPU used
7220.97 ms
speedup
6.13×
vs serial
efficiency
87.6%
of 7× ideal
stream spawn ms spawned@ work start@ work end@ work ms reap wait ms
0 (main) 0 10.16 10.17 1138.32 1128.15 0
1 2.263 2.28 14.51 1035.68 1021.17 0.13
2 1.532 3.83 17.76 991.88 974.12 0.19
3 1.592 5.43 28.81 946.43 917.62 0.21
4 1.541 6.99 57.58 1053.21 995.63 0.23
5 1.609 8.61 57.52 1175.14 1117.62 36.97
6 1.532 10.16 54.33 1120.99 1066.66 0.24
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.