[squeak-dev] Rectangle>>merging: does not accepts Sets anymore
Levente Uzonyi
leves at caesar.elte.hu
Tue Feb 16 15:38:01 UTC 2021
On Mon, 15 Feb 2021, Chris Muller wrote:
> On Sat, Feb 13, 2021 at 10:50 AM Stéphane Rollandin <lecteur at 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
More information about the Squeak-dev
mailing list
|