CPU scaling benchmark

workers
4 +1 main
iters total
500M
100000000/stream
elapsed
1183.96 ms
total CPU used
5226.21 ms
speedup
4.41×
vs serial
efficiency
88.2%
of 5× ideal
stream spawn ms spawned@ work start@ work end@ work ms reap wait ms
0 (main) 0 6.11 6.12 1107.73 1101.61 0
1 1.796 1.81 19.88 1129.7 1109.82 22.09
2 1.389 3.22 16.79 893.14 876.35 0.11
3 1.413 4.65 18.57 1012.73 994.16 0.17
4 1.44 6.1 36.7 1180.97 1144.27 73.38
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.