CPU scaling benchmark
workers
3 +1 main
iters total
500M
125000000/stream
elapsed
1111.6 ms
total CPU used
4349.03 ms
speedup
3.91×
vs serial
efficiency
97.8%
of 4× ideal
| stream | spawn ms | spawned@ | work start@ | work end@ | work ms | reap wait ms |
|---|---|---|---|---|---|---|
| 0 (main) | 0 | 5.61 | 5.62 | 1085.71 | 1080.09 | 0 |
| 1 | 2.162 | 2.18 | 16.07 | 1107.43 | 1091.36 | 22.91 |
| 2 | 1.725 | 3.93 | 16.07 | 1106.39 | 1090.32 | 25.85 |
| 3 | 1.653 | 5.6 | 17.11 | 1104.37 | 1087.26 | 18.85 |
main
w1
w2
w3
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.