CPU scaling benchmark
workers
2 +1 main
iters total
500M
166666666/stream
elapsed
1479.43 ms
total CPU used
4354.97 ms
speedup
2.94×
vs serial
efficiency
98%
of 3× ideal
| stream | spawn ms | spawned@ | work start@ | work end@ | work ms | reap wait ms |
|---|---|---|---|---|---|---|
| 0 (main) | 0 | 3.62 | 3.64 | 1444.08 | 1440.44 | 0 |
| 1 | 1.952 | 1.97 | 16.36 | 1476.55 | 1460.19 | 32.6 |
| 2 | 1.595 | 3.6 | 17.59 | 1471.93 | 1454.34 | 28.02 |
main
w1
w2
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.