You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR cockroachdb#143626 removed `golang.org/x/exp/rand` in favor of `math/rand/v2`.
The number of heap allocations grew dramatically due to new calls to
`rand.New` and `rand.NewPCG`. This commit eliminates these allocations
by reusing allocations of `rand.Rand` and `rand.PCG`.
```
name old time/op new time/op delta
InitialData/tpcc/warehouses=1 103ms ± 0% 91ms ± 0% -11.96% (p=0.016 n=4+5)
name old speed new speed delta
InitialData/tpcc/warehouses=1 2.13GB/s ± 0% 2.50GB/s ± 0% +17.58% (p=0.016 n=4+5)
name old alloc/op new alloc/op delta
InitialData/tpcc/warehouses=1 10.3MB ± 0% 0.1MB ± 0% -99.24% (p=0.008 n=5+5)
name old allocs/op new allocs/op delta
InitialData/tpcc/warehouses=1 640k ± 0% 0k ± 0% -99.97% (p=0.008 n=5+5)
```
Release note: None
0 commit comments