<div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le jeu. 25 avr. 2019 à 23:22, Nicolas Cellier <<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</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"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi,</div><div>I recently published a Chronology-Core version for using high resolution clock.</div><div><br></div><div>On my 2.7GHz core i5 MBP (2015) I get this:</div><div><br></div><div>Time highResClockTicksPerMillisecond</div><div><br></div><div> 2699824</div><div>=> OK, consistent with 2.7GHz</div><div><br></div><div>Time highResClock - Time highResClock * 1000000 // Time highResClockTicksPerMillisecond.</div><div><br></div><div> -578 -563</div><div>=> Huh, invoking a primitive takes that long (500 to 600 nanoseconds)</div><div>But I can correct it. Let's try it:</div><div><br>[10 factorial] bench.</div><div><div><br></div><div> '14,000,000 per second. 71.2 microseconds per run.'<br></div><div>=> this is the reference result<br></div><div><br></div></div><div>(1 to: 10) collect: [:i |</div><div>    | ticks |<br>    ticks := Time highResClock.<br>    10 factorial.<br>    Time highResClock - ticks +</div></div></div></div></div></div></div></div></div></blockquote><div>sorry for the extra +, editing code in mail and not doing it is a recipe for not validating! <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>    + (Time highResClock - Time highResClock) "correction"<br></div><div>    * 1000000 // Time highResClockTicksPerMillisecond "get nanoseconds"].</div><div><br></div><div> #(1309 247 88 84 74 69 71 71 71 69)</div><div>=> OK, first runs are a bit long, but we get 70ns per run as the reference<br></div><div><br> #(1977 191 143 148 142 120 122 122 117 120)</div><div>=> Oups??? Second run gives different results???</div><div><br></div><div> #(2239 180 143 143 142 116 117 117 117 114)</div><div>=> and third about the same than second...<br></div></div><div>Any idea how to explain that?<br></div></div></div></div></div></div></div></div></blockquote><div><br></div><div>If I run 200 times, I sometimes get the two regimes separated by hickups</div><div><br></div><div> #(1899 107 142 150 123 124 115 122 117 122 118 120 120 120 120 120 121 120 118 120 120 120 120 120 121 120 118 120 120 120 120 120 121 120 118 120 120 120 120 120 121 120 118 120 120 123 117 122 117 122 116 122 117 123 117 122 117 122 7950 128 117 122 120 118 9963 87 69 71 69 71 69 69 71 71 68 69 72 71 68 69 72 71 68 69 72 71 68 69 69 71 69 71 69 71 69 71 69 71 69 71 69 71 69 71 69 71 69 71 69 71 69 71 69 71 69 71 69 71 69 71 69 71 69 71 69 71 69 71 69 71 69 71 69 71 69 71 69 71 69 71 69 71 69 71 69 71 69 71 69 71 69 71 72 71 68 69 72 71 68 69 69 71 69 71 69 71 68 69 69 71 69 71 69 71 69 71 69 71 69 71 69 71 69 71 69 71 69 71 69 71 69 71 69 71 69 71 69 71 69 71)<br></div></div></div></div>