CPU scaling benchmark

workers
3 +1 main
iters total
500M
125000000/stream
elapsed
1143.83 ms
total CPU used
4465.26 ms
speedup
3.9×
vs serial
efficiency
97.5%
of 4× ideal
stream spawn ms spawned@ work start@ work end@ work ms reap wait ms
0 (main) 0 5.04 5.05 1112.29 1107.24 0
1 1.895 1.91 14.88 1128.27 1113.39 16.15
2 1.552 3.48 15.99 1140.96 1124.97 28.79
3 1.54 5.03 16.97 1136.63 1119.66 24.49
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.