<br><br><div class="gmail_quote">On Fri, Jan 15, 2010 at 1:08 PM, Nicolas Cellier <span dir="ltr">&lt;<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I noticed the first pattern is often used: we iterate on selectors<br>
when we want to iterate on CompiledMethods<br>
methodDictionary do: is maybe not a nice pattern, wa can replace with<br>
compiledMethodsDo: or just methodsDo:<br>
I think such change could be noticeable in development tools on slow machines<br>
<br></blockquote><div><br></div><div>I think the right way to iterate over a class&#39;s methods is</div><div><br></div><div>aClass selectorsAndMethodsDo: [:sel :meth| ... ]</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

{<br>
[Morph selectorsDo: [:sel | | m | m := Morph compiledMethodAt: sel]] bench.<br>
[Morph methodDictionary do: [:m | ]] bench.<br>
}<br>
#(&#39;683.0633873225355 per second.&#39; &#39;4275.94481103779 per second.&#39;)<br>
<font color="#888888"><br>
Nicolas<br>
<br>
</font></blockquote></div><br>