But if the exteriorPolygon is outside the two for loops, it’s still creating a new array for each polygon clipped, right? Which is better than for every ring * exterior, but less than having a single global array that is preallocated. I guess I would consider benchmarking this. If having the global doesn’t improve performance, then I’d probably do what you were doing originally and create the array literal as needed.