CPU scaling benchmark

workers
2 +1 main
iters total
500M
166666666/stream
elapsed
1480.48 ms
total CPU used
4353.75 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 4.13 4.15 1446.1 1441.95 0
1 2.287 2.31 15.85 1477.59 1461.74 31.62
2 1.786 4.12 17.02 1467.08 1450.06 21.15
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.