CPU scaling benchmark

workers
12 +1 main
iters total
500M
38461538/stream
elapsed
1158.98 ms
total CPU used
12791.63 ms
speedup
11.04×
vs serial
efficiency
84.9%
of 13× ideal
stream spawn ms spawned@ work start@ work end@ work ms reap wait ms
0 (main) 0 43.59 43.6 1124.29 1080.69 0
1 2.013 2.03 17.37 1132.12 1114.75 10.58
2 1.762 3.81 20.14 869.87 849.73 0.14
3 2.383 6.21 23.88 1149.07 1125.19 25.85
4 2.003 8.23 42.1 984.74 942.64 0.2
5 1.568 9.81 56.41 1156.05 1099.64 31.91
6 1.608 11.44 46.41 769.71 723.3 0.22
7 1.572 13.02 50.41 1146.1 1095.69 21.92
8 8.383 21.42 47.66 1035.94 988.28 0.23
9 7.255 28.69 87.63 1111.12 1023.49 0.25
10 1.591 30.29 87.62 1101.75 1014.13 0.26
11 1.488 31.79 97.59 1025.65 928.06 0.28
12 11.77 43.58 77.63 883.67 806.04 0.29
main
w1
w2
w3
w4
w5
w6
w7
w8
w9
w10
w11
w12
    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.