CPU scaling benchmark

workers
3 +1 main
iters total
500M
125000000/stream
elapsed
1146.5 ms
total CPU used
4390.95 ms
speedup
3.83×
vs serial
efficiency
95.8%
of 4× ideal
stream spawn ms spawned@ work start@ work end@ work ms reap wait ms
0 (main) 0 5.34 5.35 1086.92 1081.57 0
1 2.064 2.08 16.46 1105.05 1088.59 18.3
2 1.564 3.67 16.71 1111.48 1094.77 24.65
3 1.632 5.32 17.69 1143.71 1126.02 56.91
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.