<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>Well, I did not consider the 64 bit.</p>
<p><br>
</p>
<p>Imho a perfect solution would be completely ageless and even work properly after the Big Crunch, but in this case I guess the present benchmark performance is more important :) Just committed the changes into the Inbox.</p>
<p><br>
</p>
<p>Best,</p>
<p>Christoph</p>
<div id="x_Signature">
<div name="x_divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von tim Rowledge <tim@rowledge.org><br>
<b>Gesendet:</b> Mittwoch, 4. September 2019 21:09:26<br>
<b>An:</b> The general-purpose Squeak developers list<br>
<b>Betreff:</b> Re: [squeak-dev] The Inbox: ShoutCore-ct.71.mcz</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Should point out here that #primUTCMicrosecondClock has been deprecated since 5.1 and replaced by Time class>>#utcMicrosecondClock.<br>
<br>
And as for wrapping - well, a 64 bit value of microseconds starting at the beginning of 1901 will last quite a while. Call it a 63 bit value to stay positive, divide by 1e6, and 3600 and 24 and 365 and you get about 300,000 years in my workspace. I suspect
 that is far enough away to not be a practical issue. Or are we causing a Y302k problem?<br>
<br>
> On 2019-09-04, at 11:51 AM, Thiede, Christoph <Christoph.Thiede@student.hpi.uni-potsdam.de> wrote:<br>
> <br>
> Hi Levente,<br>
> <br>
> thanks for the hint. I see #primUTCMicrosecondClock is more efficient, but do we really want to risk a clock wrap here (integer overflow)?<br>
> <br>
> Best,<br>
> Christoph<br>
> <br>
> Von: Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Levente Uzonyi <leves@caesar.elte.hu><br>
> Gesendet: Mittwoch, 4. September 2019 18:55:59<br>
> An: squeak-dev@lists.squeakfoundation.org<br>
> Betreff: Re: [squeak-dev] The Inbox: ShoutCore-ct.71.mcz<br>
>  <br>
> Hi Christoph,<br>
> <br>
> On Tue, 3 Sep 2019, commits@source.squeak.org wrote:<br>
> <br>
> > A new version of ShoutCore was added to project The Inbox:<br>
> > <a href="http://source.squeak.org/inbox/ShoutCore-ct.71.mcz">http://source.squeak.org/inbox/ShoutCore-ct.71.mcz</a><br>
> ><br>
> > ==================== Summary ====================<br>
> ><br>
> > Name: ShoutCore-ct.71<br>
> > Author: ct<br>
> > Time: 3 September 2019, 2:20:09.991948 pm<br>
> > UUID: 2635dce1-6bda-3a4d-a726-3f66bb7c6431<br>
> > Ancestors: ShoutCore-ul.68<br>
> ><br>
> > Use TimeStamps instead of deprecated #primUTCMicrosecondClock.<br>
> <br>
> In my understanding, TimeStamp is something we have been keeping around, <br>
> because it's used for printing method timestamps, but for any other <br>
> purpose there's its superclass: DateAndTime.<br>
> With some effort, I think we could and should deprecate TimeStamp.<br>
> <br>
> #primUTCMicrosecondClock is still very useful, even though DateAndTime <br>
> instances are not initialized with it anymore.<br>
> For example, this primitive has the smallest overhead[1] to measure <br>
> runtime with microsecond resolution, which is exactly what the method <br>
> SHParserST80 class >> #benchmark uses it for.<br>
> <br>
> I mentioned it in an earlier mail that I intend to undeprecate it, and add <br>
> the missing primitive 243 as well, which can be used to tell the VM to <br>
> flush its time zone offset cache.<br>
> <br>
> Levente<br>
> <br>
> [1] It's a numbered primitive with no arguments returning an Integer. On <br>
> 64-bits, that integer will stay a SmallInteger for quite a while, so <br>
> there's no overhead on the image side to invoke it.<br>
> <br>
> ><br>
> > =============== Diff against ShoutCore-ul.68 ===============<br>
> ><br>
> > Item was changed:<br>
> >  ----- Method: SHParserST80 class>>benchmark (in category 'benchmarking') -----<br>
> >  benchmark<br>
> ><br>
> >        | methods methodCount totalTime averageTime min median percentile80 percentile95 percentile99 max |<br>
> >        Smalltalk garbageCollect.<br>
> >        methods := OrderedCollection new: 100000.<br>
> >        CurrentReadOnlySourceFiles cacheDuring: [<br>
> >                | parser |<br>
> >                parser := SHParserST80 new.<br>
> >                SystemNavigation default allSelectorsAndMethodsDo: [ :class :selector :method |<br>
> >                        | source start ranges |<br>
> >                        source := method getSource asString.<br>
> > +                      start := TimeStamp now.<br>
> > -                      start := Time primUTCMicrosecondClock.<br>
> >                        ranges := parser<br>
> >                                rangesIn: source<br>
> >                                classOrMetaClass: class<br>
> >                                workspace: nil<br>
> >                                environment: nil.<br>
> > +                      methods addLast: { (TimeStamp now - start) asMicroSeconds. method. ranges size } ] ].<br>
> > -                      methods addLast: { Time primUTCMicrosecondClock - start. method. ranges size } ] ].<br>
> >        methods sort: #first asSortFunction.<br>
> >        methodCount := methods size.<br>
> >        totalTime := methods detectSum: #first.<br>
> >        averageTime := (totalTime / methodCount) rounded.<br>
> ><br>
> >        min := methods first.<br>
> >        median := methods at: methodCount // 2.<br>
> >        percentile80 := methods at: (methodCount * 0.8) floor.<br>
> >        percentile95 := methods at: (methodCount * 0.95) floor.<br>
> >        percentile99 := methods at: (methodCount * 0.99) floor.<br>
> >        max := methods last.<br>
> >        ^'<br>
> >        Methods         {1}<br>
> >        Total                   {2}ms<br>
> >        Average         {3}ms<br>
> >        Min                             {4}ms {5} range(s) ({6})<br>
> >        Median                  {7}ms {8} ranges ({9})<br>
> >        80th percentile {10}ms {11} ranges ({12})<br>
> >        95th percentile {13}ms {14} ranges ({15})<br>
> >        99th percentile {16}ms {17} ranges ({18})<br>
> >        Max                     {19}ms {20} ranges ({21})' format: ({<br>
> >                methodCount asString.<br>
> >                totalTime.<br>
> >                averageTime.<br>
> >                min first.<br>
> >                min third asString.<br>
> >                min second reference.<br>
> >                median first.<br>
> >                median third asString.<br>
> >                median second reference.<br>
> >                percentile80 first.<br>
> >                percentile80 third asString.<br>
> >                percentile80 second reference.<br>
> >                percentile95 first.<br>
> >                percentile95 third asString.<br>
> >                percentile95 second reference.<br>
> >                percentile99 first.<br>
> >                percentile99 third asString.<br>
> >                percentile99 second reference.<br>
> >                max first.<br>
> >                max third asString.<br>
> >                max second reference } replace: [ :each |<br>
> >                        each isNumber<br>
> >                                ifTrue: [ (each / 1000) printShowingDecimalPlaces: 3 ]<br>
> >                                ifFalse: [ each ] ])!<br>
<br>
<br>
tim<br>
--<br>
tim Rowledge; tim@rowledge.org; <a href="http://www.rowledge.org/tim">http://www.rowledge.org/tim</a><br>
.signature not found!  reformat hard drive? [Yn]<br>
<br>
<br>
<br>
</div>
</span></font>
</body>
</html>