CPU scaling benchmark
workers
12 +1 main
iters total
500M
38461538/stream
elapsed
1152.49 ms
total CPU used
13730.66 ms
speedup
11.91×
vs serial
efficiency
91.6%
of 13× ideal
| stream | spawn ms | spawned@ | work start@ | work end@ | work ms | reap wait ms |
|---|---|---|---|---|---|---|
| 0 (main) | 0 | 48.66 | 48.67 | 1122.46 | 1073.79 | 0 |
| 1 | 1.558 | 1.57 | 14.22 | 1081.86 | 1067.64 | 0.13 |
| 2 | 1.437 | 3.03 | 15.6 | 1123.28 | 1107.68 | 3.9 |
| 3 | 1.443 | 4.49 | 16.98 | 1092.39 | 1075.41 | 0.18 |
| 4 | 1.462 | 5.97 | 36.77 | 1133.79 | 1097.02 | 11.41 |
| 5 | 7.739 | 13.72 | 35.15 | 1035.73 | 1000.58 | 0.19 |
| 6 | 1.599 | 15.33 | 47.37 | 1142.57 | 1095.2 | 20.2 |
| 7 | 1.467 | 16.82 | 49.15 | 1149.85 | 1100.7 | 27.48 |
| 8 | 4.049 | 20.88 | 61.08 | 1114.19 | 1053.11 | 0.2 |
| 9 | 3.721 | 24.62 | 63.71 | 1026.56 | 962.85 | 0.22 |
| 10 | 5.421 | 30.05 | 75.36 | 1144.6 | 1069.24 | 24.8 |
| 11 | 5.396 | 35.46 | 83.52 | 1083.42 | 999.9 | 0.23 |
| 12 | 13.179 | 48.65 | 96.25 | 1123.79 | 1027.54 | 10.54 |
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.