CPU scaling benchmark

workers
4 +1 main
iters total
500M
100000000/stream
elapsed
1213.45 ms
total CPU used
5256.86 ms
speedup
4.33×
vs serial
efficiency
86.6%
of 5× ideal
stream spawn ms spawned@ work start@ work end@ work ms reap wait ms
0 (main) 0 6.48 6.49 1195.93 1189.44 0
1 1.945 1.96 14.25 925.8 911.55 0.1
2 1.436 3.42 20.26 924.44 904.18 0.16
3 1.491 4.93 17.62 1096.03 1078.41 0.17
4 1.526 6.47 37.06 1210.34 1173.28 14.52
main
w1
w2
w3
w4
    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.