<div dir="ltr"><div>Hi,</div><div>2^30 loops (10^9)!<br></div><div>we should stop accelerating the VM, this is creating problems!</div><div><br></div><div>Note that there is a benchFor: 3 seconds or whatever Duration in Squeak.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le sam. 9 nov. 2019 à 05:19, Andres Valloud via Cuis-dev <<a href="mailto:cuis-dev@lists.cuis.st">cuis-dev@lists.cuis.st</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
>> First, especially in 32 bit systems, it's very important never to send <br>
>> timesRepeat: to a large integer --- this is why the large integer <br>
>> method splits the process in rounds of timesRepeat: sent to small <br>
>> integers. <br>
> <br>
> I guess you mean 'never run the iteration on LargeInteger arithmetic', <br>
> so with the splitting in LargePositiveInteger, sending timesRepeat: to a <br>
> large integer is ok...<br>
<br>
Yeah, that's what I meant.  If you only had the simple implementation in <br>
Integer, then the to:do: will create large integers for every iteration. <br>
  That is a) slow in itself, and b) creates garbage that later has to be <br>
collected.<br>
<br>
> Interesting. Not the case in Cuis, where there is no Compiler <br>
> optimization of #timesRepeat:<br>
<br>
Right --- if that did happen though, then we'd be looking at writing <br>
timesRepeat: [aBlock value].<br>
<br>
> Still, I wasn't explicit on what I really wanted to ask... My question <br>
> is: Is #bench (or bench: seconds) a good replacement for #timesRepeat:? <br>
> If so, does still make sense to have an optimized version of #timesRepeat:?<br>
<br>
If there was bench: seconds, and if that accepted a float argument so <br>
one could say things like bench: 1.5 and things like that, then the <br>
timesRepeat: improvement would be less important for this use case.<br>
<br>
The timesRepeat: improvements might still matter, but we'd have to find <br>
another justification for them first.<br>
<br>
Andres.<br>
-- <br>
Cuis-dev mailing list<br>
<a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a><br>
<a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
</blockquote></div>