CPU scaling benchmark

workers
4 +1 main
iters total
500M
100000000/stream
elapsed
1254.42 ms
total CPU used
5308.59 ms
speedup
4.23×
vs serial
efficiency
84.6%
of 5× ideal
stream spawn ms spawned@ work start@ work end@ work ms reap wait ms
0 (main) 0 6.61 6.62 1254.15 1247.53 0
1 2.022 2.04 19.24 1005.85 986.61 0.1
2 1.557 3.62 17.88 969.6 951.72 0.18
3 1.526 5.17 17.3 1041.28 1023.98 0.2
4 1.414 6.6 34.27 1133.02 1098.75 0.22
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.