[squeak-dev] The Inbox: Graphics-nice.446.mcz
Stéphane Rollandin
lecteur at zogotounga.net
Sat Feb 20 18:49:55 UTC 2021
> To Nicolas' comment:
> > But that's precisely what we try to avoid here: create lots of
> > intermediate short-lived objects (Rectangle and Point).
> > This is because it may be a performance critical routine.
>
> The most optimized version with the inlined temporaries is a great
> implementation but looks like quite a beast to me, which in my opinion
> would be sad for something that appears in our standard library. After
> looking for senders of Rectangle class>>merging: in my trunk image I
> only saw one critical path in recordInvalidRect:, which appears to on
> average trigger merging: only once per damaged frame. Is there another
> use case we know of?
Well yes, I am using #merging: and #encompassing: as primitive methods
in computational geometry stuff, and as such I want them as optimized as
possible.
Also, I do not get the rationale behind the idea that methods in the
standard library should be subpar.
Regards,
Stef
More information about the Squeak-dev
mailing list
|