CPU scaling benchmark

workers
4 +1 main
iters total
500M
100000000/stream
elapsed
1172.27 ms
total CPU used
5320.61 ms
speedup
4.54×
vs serial
efficiency
90.8%
of 5× ideal
stream spawn ms spawned@ work start@ work end@ work ms reap wait ms
0 (main) 0 6.41 6.42 1172.03 1165.61 0
1 1.822 1.83 13.9 979.21 965.31 0.09
2 1.479 3.33 15.14 1008.89 993.75 0.16
3 1.488 4.84 17.18 1115.46 1098.28 0.18
4 1.532 6.39 31.56 1129.22 1097.66 0.2
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.