CPU scaling benchmark
workers
12 +1 main
iters total
500M
38461538/stream
elapsed
1187.83 ms
total CPU used
12746.59 ms
speedup
10.73×
vs serial
efficiency
82.5%
of 13× ideal
| stream | spawn ms | spawned@ | work start@ | work end@ | work ms | reap wait ms |
|---|---|---|---|---|---|---|
| 0 (main) | 0 | 24.92 | 24.94 | 1169.27 | 1144.33 | 0 |
| 1 | 1.983 | 2 | 50.29 | 1091.19 | 1040.9 | 0.19 |
| 2 | 1.57 | 3.59 | 42.38 | 1121 | 1078.62 | 0.26 |
| 3 | 1.57 | 5.18 | 60.61 | 1059.04 | 998.43 | 0.28 |
| 4 | 1.515 | 6.72 | 46.24 | 980.03 | 933.79 | 0.3 |
| 5 | 1.557 | 8.29 | 58.57 | 1173.29 | 1114.72 | 4.16 |
| 6 | 1.526 | 9.84 | 73.38 | 1018.67 | 945.29 | 0.31 |
| 7 | 1.656 | 11.51 | 62.77 | 965.71 | 902.94 | 0.32 |
| 8 | 1.591 | 13.12 | 80.64 | 783.47 | 702.83 | 0.34 |
| 9 | 1.489 | 14.62 | 42.02 | 964.91 | 922.89 | 0.35 |
| 10 | 6.09 | 20.73 | 70.66 | 1185.03 | 1114.37 | 15.89 |
| 11 | 2.402 | 23.15 | 93.7 | 1116.23 | 1022.53 | 0.36 |
| 12 | 1.735 | 24.91 | 100.65 | 925.6 | 824.95 | 0.38 |
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.