CPU scaling benchmark

workers
4 +1 main
iters total
500M
100000000/stream
elapsed
1206.41 ms
total CPU used
5229.67 ms
speedup
4.33×
vs serial
efficiency
86.6%
of 5× ideal
stream spawn ms spawned@ work start@ work end@ work ms reap wait ms
0 (main) 0 10.15 10.16 1206.14 1195.98 0
1 2.037 2.05 15.13 890.8 875.67 0.11
2 1.82 3.89 16.71 1009.29 992.58 0.19
3 1.58 5.49 17.89 1033.44 1015.55 0.21
4 4.637 10.14 31.17 1181.06 1149.89 0.22
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.