Hi Alain,<div><br></div><div> I think what you're seeing here is clock resolution. I think you'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"><<a href="mailto:alr.dev@free.fr">alr.dev@free.fr</a>></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 "idle")<br>
seems to make it run much faster (!!!).<br>
Strange Windows.<br>
<br>
Regards<br>
<br>
Alain<br>
<br>
"Levente Uzonyi" <<a href="mailto:leves@elte.hu">leves@elte.hu</a>> 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">> On Fri, 21 May 2010, Alain_Rastoul wrote:<br>
><br>
>> Hello,<br>
>><br>
>> I recently tryed then 4.1 and discovered a strange behavior that<br>
>> appearead<br>
>> to be true with the 3.10 also.<br>
>> The test is simply running benchFib in series of runs.<br>
>> If I run the test 10 times, on of the run is about 2-3 times faster than<br>
>> the<br>
>> others, and I can't explain that.<br>
>><br>
>> 10 timesRepeat: [<br>
>> | r t |<br>
>> t := Time millisecondsToRun: [r := 26 benchFib].<br>
>> Transcript show: ((r * 1000) // t) ; cr.<br>
>> ]<br>
><br>
> I can't reproduce this. I think it's just noise from your OS. But try to<br>
> evaluate this:<br>
><br>
> [<br>
> ((1 to: 100)<br>
> collect: [ :run |<br>
> (Integer >> #benchFib) flushCache.<br>
> [ 26 benchFib ] timeToRunWithoutGC ]) sort ] valueAt: 80.<br>
><br>
> If you get the same results, then GC and caching doesn't change the<br>
> behavior, so you can be pretty sure that it's just OS-noise. Try<br>
> increasing the priority of Squeak's process and repeat the tests.<br>
><br>
><br>
> Levente<br>
><br>
>><br>
>> will give me 10 numbers about 2486297 (one of the runs)<br>
>> but one run will give me 10 numbers about 6773017.<br>
>> I stopped all I could stop on my laptop and nothing else but squeak is<br>
>> running...<br>
>> I made a TimeProfileBrowser and the inner loop of the profile seems to<br>
>> show<br>
>> that primitives are more than 2 times faster.<br>
>> (and everything seems 2 times faster)<br>
>> Anybody noticed that (I searched the web but found nothing) ?<br>
>> primitive calls ?<br>
>> methodCache?<br>
>><br>
>><br>
>> Best regards,<br>
>><br>
>> Alain<br>
>><br>
>><br>
>><br>
>><br>
>><br>
><br>
><br>
<br>
<br>
<br>
<br>
</div></div></blockquote></div><br></div>