<div dir="ltr">In all Smalltalks I know, you can disable that optimization made by the compiler. <div>Juan Vuletich did that a couple of days ago in Cuis (<a href="http://www.cuis-smalltalk.org/">http://www.cuis-smalltalk.org/</a>) and ran [Compiler recompileAll] timeToRun. to see the performance impact. Here are the numbers:</div><div>Cuis with the optimization:</div><div>4207<br>4328<br>With #ifTrue: not optimized:<br>5717<br>5722<br>With #ifFalse: also deoptimized:<br>6052<br>6088<br>With #ifTrue:ifFalse: also deoptimized:<br>8173<br>8038<br>With #ifFalse:ifTrue: also deoptimized:<br>8387<br>8306<br></div><div><br></div><div>Almost 2x without the optimizations. </div><div>Doing this he could change the behavior of those messages.</div><div><br></div><div>Cheers!</div><div>Hernan.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Dec 13, 2021 at 11:47 PM <<a href="mailto:mail@russell-allen.com">mail@russell-allen.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><font face="arial" size="2"><p style="margin:0px;padding:0px;font-family:arial;font-size:10pt"> </p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt">-----Original Message-----<br>From: "Eric Nijakowski" <<a href="mailto:eric.nijakowski@web.de" target="_blank">eric.nijakowski@web.de</a>></p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt"> </p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt">> The way I understand it, the fact that Smalltalk treats "ifTrue:" <br>differently is mostly a compiler issue. </p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt"> </p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt">Did any of the Smalltalk80s change this? It is a bit of an egregious example of VMs cheating but getting caught.</p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt"> </p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt">I remember when I first started using Smalltalk (Squeak) I tried to add a sort of ternary logic - ie as well as True and False adding Unknown, and couldn't understand why it didn't work! (maybe if I'd read the manual...)</p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt"> </p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt">Russell</p>
<p style="margin:0px;padding:0px;font-family:arial;font-size:10pt"> </p></font>_______________________________________________<br>
Self-interest mailing list<br>
<a href="mailto:Self-interest@lists.selflanguage.org" target="_blank">Self-interest@lists.selflanguage.org</a><br>
<a href="http://lists.selflanguage.org/mailman/listinfo/self-interest" rel="noreferrer" target="_blank">http://lists.selflanguage.org/mailman/listinfo/self-interest</a><br>
</blockquote></div>