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
- call-in-bodyThe loop body calls a function
- extern-call-in-bodyThe loop body calls an external function
- indirect-callThe loop body calls through a function pointer
- inline-asmThe loop body contains inline assembly
- control-flowThe loop body branches
- early-exitThe loop can leave before its trip count
- int16-elements16-bit integer elements have no kernel
- int64-elements64-bit integer elements have no kernel