On Mon, 15 Feb 2021, Chris Muller wrote:
On Sat, Feb 13, 2021 at 10:50 AM Stéphane Rollandin lecteur@zogotounga.net wrote: >> I don't have an easy way to verify, but it looks like adding #asArray >> might resolve the issue for Sets (e.g. listOfRects asArray in #merging:).
Yes it would, but at a cost that I would better avoid (both in term of performance and GC), since #merging: is a pretty fundamental method for computational geometry.
In which case you should make use of #quickMerge: then.
I don't think that's a good idea. It'll still create lots of garbage when merging more than two rectangles.
Levente