CPU scaling benchmark

workers
6 +1 main
iters total
500M
71428571/stream
elapsed
1144.87 ms
total CPU used
7018.59 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 9.47 9.48 1112.2 1102.72 0
1 1.959 1.98 14.55 994.64 980.09 0.11
2 1.556 3.55 21.46 829.5 808.04 0.17
3 1.444 5.01 32.39 1101.23 1068.84 0.18
4 1.514 6.55 35.46 925.35 889.89 0.19
5 1.454 8.02 45.47 1142 1096.53 29.9
6 1.424 9.46 33.71 1106.19 1072.48 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.