<div dir="ltr"><div>Then what does #, exactly if not traversing the String from the beginning when making a concatenated copy?<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/4/27 Frank Shearar <span dir="ltr"><<a href="mailto:frank.shearar@gmail.com" target="_blank">frank.shearar@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In Schlemiel's algorithm you have to traverse your string from the<br>
beginning. Here, the problem is that at every step you're making<br>
String after String after String that you just throw away.<br>
<br>
Unless perhaps you're suggesting that the Schlemielness comes from not<br>
doing things the way our particular garbage collector like to do<br>
things?<br>
<br>
frank<br>
<br>
On 27 April 2013 22:08, Nicolas Cellier<br>
<div class="HOEnZb"><div class="h5"><<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>> wrote:<br>
> <a href="http://en.wikipedia.org/wiki/Schlemiel_the_Painter%27s_algorithm" target="_blank">http://en.wikipedia.org/wiki/Schlemiel_the_Painter%27s_algorithm</a><br>
><br>
><br>
> 2013/4/27 <<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a>><br>
><br>
>> Levente Uzonyi uploaded a new version of Tests to project The Trunk:<br>
>> <a href="http://source.squeak.org/trunk/Tests-ul.200.mcz" target="_blank">http://source.squeak.org/trunk/Tests-ul.200.mcz</a><br>
>><br>
>> ==================== Summary ====================<br>
>><br>
>> Name: Tests-ul.200<br>
>> Author: ul<br>
>> Time: 27 April 2013, 10:08:43.206 pm<br>
>> UUID: dfe70287-0768-42f9-97b7-d7ba6fbd6bb6<br>
>> Ancestors: Tests-fbs.199<br>
>><br>
>> - avoid suboptimal string concatentation in ReleaseTest >><br>
>> #testMethodsWithUnboundGlobals<br>
>><br>
>> =============== Diff against Tests-fbs.199 ===============<br>
>><br>
>> Item was changed:<br>
>> ----- Method: ReleaseTest>>testMethodsWithUnboundGlobals (in category<br>
>> 'testing') -----<br>
>> testMethodsWithUnboundGlobals<br>
>> | unbound |<br>
>> unbound := SystemNavigation default methodsWithUnboundGlobals.<br>
>> Smalltalk cleanOutUndeclared.<br>
>> + self assert: unbound isEmpty description: 'Unbound: ', unbound<br>
>> asCommaString!<br>
>> - self assert: unbound isEmpty description: ('Unbound: ', (unbound<br>
>> reduce: [:acc :each | acc, ', ', each]))!<br>
>><br>
>><br>
><br>
><br>
><br>
><br>
<br>
</div></div></blockquote></div><br></div>