CPU scaling benchmark

workers
6 +1 main
iters total
500M
71428571/stream
elapsed
1160.79 ms
total CPU used
7111.7 ms
speedup
6.13×
vs serial
efficiency
87.6%
of 7× ideal
stream spawn ms spawned@ work start@ work end@ work ms reap wait ms
0 (main) 0 12.01 12.02 1094.09 1082.07 0
1 1.993 2.01 18.23 1149.73 1131.5 55.77
2 1.519 3.55 18.68 1021.6 1002.92 0.11
3 2.439 6.01 35.85 1077.45 1041.6 0.16
4 1.981 8 26.53 922.99 896.46 0.18
5 2.135 10.16 38.84 874.22 835.38 0.2
6 1.825 12 35.87 1157.64 1121.77 63.69
main
w1
w2
w3
w4
w5
w6
    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.