CPU scaling benchmark
workers
9 +1 main
iters total
500M
50000000/stream
elapsed
1170.37 ms
total CPU used
9996.75 ms
speedup
8.54×
vs serial
efficiency
85.4%
of 10× ideal
| stream | spawn ms | spawned@ | work start@ | work end@ | work ms | reap wait ms |
|---|---|---|---|---|---|---|
| 0 (main) | 0 | 15.16 | 15.39 | 1033.56 | 1018.17 | 0 |
| 1 | 1.956 | 1.97 | 19.4 | 1136.95 | 1117.55 | 103.53 |
| 2 | 1.624 | 3.62 | 28.59 | 820.08 | 791.49 | 0.14 |
| 3 | 1.781 | 5.42 | 20.17 | 913.5 | 893.33 | 0.2 |
| 4 | 1.708 | 7.15 | 61.07 | 1043.14 | 982.07 | 9.71 |
| 5 | 1.628 | 8.8 | 46.71 | 1102.95 | 1056.24 | 72.38 |
| 6 | 1.522 | 10.33 | 51.06 | 971.38 | 920.32 | 0.22 |
| 7 | 1.621 | 11.97 | 48.14 | 1121.71 | 1073.57 | 90.51 |
| 8 | 1.636 | 13.62 | 78.29 | 1167.44 | 1089.15 | 134.01 |
| 9 | 1.515 | 15.15 | 61.13 | 1115.99 | 1054.86 | 85.25 |
main
w1
w2
w3
w4
w5
w6
w7
w8
w9
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.