You could move this out of the loop and do `sizeDelta += (sampleWeight - 1) * OVERHEAD_PER_VALUE.toBytes()`