CPU scaling benchmark

workers
2 +1 main
iters total
500M
166666666/stream
elapsed
1493.47 ms
total CPU used
4382.23 ms
speedup
2.93×
vs serial
efficiency
97.7%
of 3× ideal
stream spawn ms spawned@ work start@ work end@ work ms reap wait ms
0 (main) 0 3.31 3.32 1447.43 1444.11 0
1 1.878 1.89 14.32 1490.48 1476.16 43.21
2 1.384 3.3 15.17 1477.13 1461.96 29.89
main
w1
w2
    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.