<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jan 9, 2014 at 2:01 AM, Levente Uzonyi <span dir="ltr">&lt;<a href="mailto:leves@elte.hu" target="_blank">leves@elte.hu</a>&gt;</span> wrote:<br>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Also, I prefer the lazy #or: over #|, because it&#39;s faster.</blockquote><div><br></div><div>Normally, yes, but in this case, I think #| is actually faster. Consider the two versions (without the bug):</div><div><br></div>
<div>a)  (lastObject == object) | (object == 0)</div><div><br></div><div>b) (lastObject == object) or: [object == 0]</div><div><br></div><div>Lazy evaluation doesn&#39;t help here, because the first comparison will almost never be true. On the other hand, #== is very fast, because it&#39;s a bytecode, whereas #or: involves an extra message send and creating a stack frame to execute the block.</div>
<div><br></div><div>Colin</div><div><br></div></div></div></div>