<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>    + (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>