CPU scaling benchmark

workers
6 +1 main
iters total
500M
71428571/stream
elapsed
1191.3 ms
total CPU used
7092.13 ms
speedup
5.95×
vs serial
efficiency
85%
of 7× ideal
stream spawn ms spawned@ work start@ work end@ work ms reap wait ms
0 (main) 0 16.44 16.45 670.92 654.47 0
1 2.466 2.48 24.4 987.68 963.28 320.37
2 1.926 4.43 27.76 1176.34 1148.58 505.57
3 1.853 6.3 40.14 1066.18 1026.04 396.95
4 2.808 9.12 23.77 1166.33 1142.56 495.56
5 5.323 14.48 49.78 1064.29 1014.51 398.7
6 1.936 16.43 45.01 1187.7 1142.69 516.91
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.