Mettle

alloc-in-bodyThe loop body allocates

Reported by --explain after a verdict.

mettle explain alloc-in-body

Every iteration runs new. Allocation is a call into the allocator, it can fail, and it has an order the lanes would have to keep.

Fix: allocate once before the loop and reuse the buffer.

Related