CPU scaling benchmark

workers
4 +1 main
iters total
500M
100000000/stream
elapsed
1224.5 ms
total CPU used
5288.7 ms
speedup
4.32×
vs serial
efficiency
86.4%
of 5× ideal
stream spawn ms spawned@ work start@ work end@ work ms reap wait ms
0 (main) 0 6.5 6.51 1136.43 1129.92 0
1 1.815 1.83 16.03 1061.39 1045.36 0.1
2 1.538 3.39 17.01 950.55 933.54 0.17
3 1.526 4.93 18.09 1221.73 1203.64 85.44
4 1.54 6.49 34.72 1010.96 976.24 0.18
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.