CPU scaling benchmark

workers
4 +1 main
iters total
500M
100000000/stream
elapsed
1272.88 ms
total CPU used
5357.12 ms
speedup
4.21×
vs serial
efficiency
84.2%
of 5× ideal
stream spawn ms spawned@ work start@ work end@ work ms reap wait ms
0 (main) 0 7.41 7.42 1124.92 1117.5 0
1 1.985 2.01 24.41 923.32 898.91 0.1
2 1.677 3.72 19.93 1037.71 1017.78 0.17
3 1.798 5.55 21.33 1118.6 1097.27 0.19
4 1.799 7.39 44.26 1269.92 1225.66 145.17
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.