[squeak-dev] translated considered harmful (in its current implementation)
Marcel Taeumel
marcel.taeumel at hpi.de
Mon Nov 2 16:17:29 UTC 2020
Hi Tim.
> Dare I ask why it tries to set a property on a method?
A cache because package-name lookup for methods is expensive:
m := Morph >> #drawOn:.
[PackageOrganizer default packageOfMethod: m methodReference ifNone: []] bench.
--- '3,580 per second. 279 microseconds per run. 0.41983 % GC time.'
Almost as expensive as that not optimized #translatedInAllDomains ^__^
['Hello World' translatedInAllDomains] bench.
--- '9,250 per second. 108 microseconds per run. 3.19872 % GC time.'
Best,
Marcel
Am 29.10.2020 20:41:02 schrieb tim Rowledge <tim at rowledge.org>:
Wow. That's some expensive code.
Dare I ask why it tries to set a property on a method?
Is this a place where A Dreaded Preference might actually be sensible?
tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: D: Detonate
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20201102/3e3bbadc/attachment.html>
More information about the Squeak-dev
mailing list
|