CPU scaling benchmark

workers
2 +1 main
iters total
500M
166666666/stream
elapsed
1471 ms
total CPU used
4348.3 ms
speedup
2.96×
vs serial
efficiency
98.7%
of 3× ideal
stream spawn ms spawned@ work start@ work end@ work ms reap wait ms
0 (main) 0 3.35 3.36 1448.2 1444.84 0
1 1.846 1.87 15.7 1467.97 1452.27 22.13
2 1.446 3.34 16.02 1467.21 1451.19 19.18
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.