[squeak-dev] iterating on compiled methods
eliot.miranda at gmail.com
Sat Jan 16 01:50:16 UTC 2010
On Fri, Jan 15, 2010 at 1:08 PM, Nicolas Cellier <
nicolas.cellier.aka.nice at gmail.com> wrote:
> I noticed the first pattern is often used: we iterate on selectors
> when we want to iterate on CompiledMethods
> methodDictionary do: is maybe not a nice pattern, wa can replace with
> compiledMethodsDo: or just methodsDo:
> I think such change could be noticeable in development tools on slow
I think the right way to iterate over a class's methods is
aClass selectorsAndMethodsDo: [:sel :meth| ... ]
> [Morph selectorsDo: [:sel | | m | m := Morph compiledMethodAt: sel]] bench.
> [Morph methodDictionary do: [:m | ]] bench.
> #('683.0633873225355 per second.' '4275.94481103779 per second.')
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev