CPU scaling benchmark

workers
3 +1 main
iters total
500M
125000000/stream
elapsed
1125.99 ms
total CPU used
4379.65 ms
speedup
3.89×
vs serial
efficiency
97.3%
of 4× ideal
stream spawn ms spawned@ work start@ work end@ work ms reap wait ms
0 (main) 0 5.24 5.25 1086.26 1081.01 0
1 2.019 2.03 15.63 1123.35 1107.72 37.18
2 1.552 3.61 15.62 1117.74 1102.12 31.59
3 1.605 5.24 16.96 1105.76 1088.8 19.64
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.