CPU scaling benchmark

workers
3 +1 main
iters total
500M
125000000/stream
elapsed
1117.27 ms
total CPU used
4356.49 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 5.72 5.72 1086.86 1081.14 0
1 2.09 2.11 14.48 1104.95 1090.47 18.25
2 1.567 3.69 15.61 1106.01 1090.4 21.14
3 2.002 5.71 18.45 1112.93 1094.48 26.17
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.