While this only saves 40ns (70ns down to 30ns - probably more if there are other threads causing allocator contention)
per sample, I still think it makes sense to not allocate here.
This was the only use of sample_inplace in this codebase. I also have an impl that scales to higher amounts, but it uses const generics which won't fit in the current MSRV
While this only saves 40ns (70ns down to 30ns - probably more if there are other threads causing allocator contention) per sample, I still think it makes sense to not allocate here.
This was the only use of
sample_inplace
in this codebase. I also have an impl that scales to higheramount
s, but it uses const generics which won't fit in the current MSRV