Hi Alain,<div><br></div><div>    I think what you&#39;re seeing here is clock resolution.  I think you&#39;re running too simple a benchmark to get reliable results.  When I run on Cog (2.66GHz Intel Core i7) I get most results around 65,000,000, the occasional one around 50,000,000 and rarely one around 98,000,000.  But when I try evaluating 30 benchFib instead of 26 benchFib things settle down.  When I use 32 benchFib (which takes around 125 ms) I see very small variance, every result being between 55,000,000 and 58,000,000.  SI experiment with different values and see if your times settle down as you increase N also.<br>
<br><div class="gmail_quote">On Fri, May 21, 2010 at 2:37 PM, Alain_Rastoul <span dir="ltr">&lt;<a href="mailto:alr.dev@free.fr">alr.dev@free.fr</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Right, it has nothing to do with commonSend and cache.<br>
Being stubborn I added cache hit / misses counters to the vm but it showed<br>
nothing significant except a very good ratio : 95 to 98%  :)<br>
<br>
In addition, putting the squeak process to a lowest priority (even &quot;idle&quot;)<br>
seems to make it run much faster (!!!).<br>
Strange Windows.<br>
<br>
Regards<br>
<br>
Alain<br>
<br>
&quot;Levente Uzonyi&quot; &lt;<a href="mailto:leves@elte.hu">leves@elte.hu</a>&gt; a écrit dans le message de news:<br>
Pine.LNX.4.64.1005211945090.15643@login01.caesar.elte.hu...<br>
<div><div></div><div class="h5">&gt; On Fri, 21 May 2010, Alain_Rastoul wrote:<br>
&gt;<br>
&gt;&gt; Hello,<br>
&gt;&gt;<br>
&gt;&gt; I recently tryed then 4.1 and discovered a strange behavior that<br>
&gt;&gt; appearead<br>
&gt;&gt; to be true with the 3.10 also.<br>
&gt;&gt; The test is simply running benchFib in series of runs.<br>
&gt;&gt; If I run the test 10 times, on of the run is about 2-3 times faster than<br>
&gt;&gt; the<br>
&gt;&gt; others, and I can&#39;t explain that.<br>
&gt;&gt;<br>
&gt;&gt; 10 timesRepeat: [<br>
&gt;&gt; | r t |<br>
&gt;&gt;   t := Time millisecondsToRun: [r := 26 benchFib].<br>
&gt;&gt;   Transcript show: ((r * 1000) // t) ; cr.<br>
&gt;&gt; ]<br>
&gt;<br>
&gt; I can&#39;t reproduce this. I think it&#39;s just noise from your OS. But try to<br>
&gt; evaluate this:<br>
&gt;<br>
&gt; [<br>
&gt;  ((1 to: 100)<br>
&gt;  collect: [ :run |<br>
&gt;  (Integer &gt;&gt; #benchFib) flushCache.<br>
&gt;  [ 26 benchFib ] timeToRunWithoutGC ]) sort ] valueAt: 80.<br>
&gt;<br>
&gt; If you get the same results, then GC and caching doesn&#39;t change the<br>
&gt; behavior, so you can be pretty sure that it&#39;s just OS-noise. Try<br>
&gt; increasing the priority of Squeak&#39;s process and repeat the tests.<br>
&gt;<br>
&gt;<br>
&gt; Levente<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; will give me 10 numbers about 2486297 (one of the runs)<br>
&gt;&gt; but one run will give me 10 numbers about 6773017.<br>
&gt;&gt; I stopped all I could stop on my laptop and nothing else but squeak is<br>
&gt;&gt; running...<br>
&gt;&gt; I made a TimeProfileBrowser and the inner loop of the profile seems to<br>
&gt;&gt; show<br>
&gt;&gt; that primitives are more than 2 times faster.<br>
&gt;&gt; (and everything seems 2 times faster)<br>
&gt;&gt; Anybody noticed that (I searched the web but found nothing) ?<br>
&gt;&gt; primitive calls ?<br>
&gt;&gt; methodCache?<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Best regards,<br>
&gt;&gt;<br>
&gt;&gt; Alain<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
<br>
<br>
<br>
<br>
</div></div></blockquote></div><br></div>