CPU scaling benchmark

workers
3 +1 main
iters total
500M
125000000/stream
elapsed
1113.79 ms
total CPU used
4351.78 ms
speedup
3.91×
vs serial
efficiency
97.8%
of 4× ideal
stream spawn ms spawned@ work start@ work end@ work ms reap wait ms
0 (main) 0 4.8 4.81 1085.52 1080.71 0
1 1.883 1.89 16.75 1107.57 1090.82 23.92
2 1.453 3.37 17.2 1104.39 1087.19 19.01
3 1.398 4.79 18.61 1111.67 1093.06 26.82
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.