CPU scaling benchmark

workers
3 +1 main
iters total
500M
125000000/stream
elapsed
1113.96 ms
total CPU used
4346.59 ms
speedup
3.9×
vs serial
efficiency
97.5%
of 4× ideal
stream spawn ms spawned@ work start@ work end@ work ms reap wait ms
0 (main) 0 4.73 4.74 1083.03 1078.29 0
1 1.784 1.8 16.1 1107.1 1091 24.17
2 1.435 3.26 16.1 1100.28 1084.18 17.37
3 1.437 4.72 18.05 1111.17 1093.12 28.23
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.