Optimize setLength v (parallel v ..) and setLength v (sequential v ..).