[squeak-dev] The Trunk: Files-ul.108.mcz

Levente Uzonyi leves at elte.hu
Tue Apr 26 17:59:17 UTC 2011


On Tue, 26 Apr 2011, Chris Muller wrote:

> Why do that from the sender?  Symbol>>#= already checks via == in the
> first two lines..

It's faster, because there's no method lookup, no message send, no 
suspension point. The commit message is misleading, because all, but the 
last comparison in this loop is done between a Symbol and an Array. So in 
almost all cases it saves 3 message sends, while in the last case it saves 
one.
Actually I don't expect that it saves that much of total runtime, but why 
not use this property of Symbols and have better performance for free?


Levente

>
> - Chris
>

snip



More information about the Squeak-dev mailing list