CPU scaling benchmark
workers
4 +1 main
iters total
500M
100000000/stream
elapsed
1235 ms
total CPU used
5314.79 ms
speedup
4.3×
vs serial
efficiency
86%
of 5× ideal
| stream | spawn ms | spawned@ | work start@ | work end@ | work ms | reap wait ms |
|---|---|---|---|---|---|---|
| 0 (main) | 0 | 7.2 | 7.21 | 1079.23 | 1072.02 | 0 |
| 1 | 2.322 | 2.33 | 14.84 | 1124.26 | 1109.42 | 45.16 |
| 2 | 1.604 | 3.96 | 16.51 | 982.9 | 966.39 | 0.11 |
| 3 | 1.617 | 5.59 | 23.63 | 1231.94 | 1208.31 | 152.88 |
| 4 | 1.58 | 7.19 | 38.11 | 996.76 | 958.65 | 0.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.