[squeak-dev] A UTC based implementation of DateAndTime
David T. Lewis
lewis at mail.msen.com
Sun Jun 1 19:29:08 UTC 2014
On Wed, May 28, 2014 at 08:13:56AM -0400, David T. Lewis wrote:
> On Wed, May 28, 2014 at 11:49:08AM +0200, Bert Freudenberg wrote:
> > On 25.05.2014, at 19:48, David T. Lewis <lewis at mail.msen.com> wrote:
> >
> > > Performance of the UTC based DateAndTime is generally favorable compared to
> > > the original. Here is what I see on my system (smaller numbers are better).
> > >
> > > LXTestDateAndTimePerformance test results using the original Squeak DateAndTime
> > > on an interpreter VM:
> > > {
> > > #testNow->10143 .
> > > #testEquals->30986 .
> > > #testGreaterThan->80199 .
> > > #testLessThan->75912 .
> > > #testPrintString->10429 .
> > > #testStringAsDateAndTime->44657
> > > }
> > >
> > > LXTestDateAndTimePerformance test results using the new UTC based DateAndTime
> > > on an interpreter VM:
> > > {
> > > #testNow->6423 .
> > > #testEquals->31625 .
> > > #testGreaterThan->22999 .
> > > #testLessThan->18514 .
> > > #testPrintString->12502 .
> > > #testStringAsDateAndTime->32912
> > > }
> >
> > Hi Dave,
> >
> > just curious: did you test the performance without the LargeInt primitives?
> >
> > - Bert -
> >
>
> For the new UTC implementation with the primitive disabled, fallback code is
> much slower for DateAndTime class>>now.
>
> {
> #testNow->36939 .
> #testEquals->29015 .
> #testGreaterThan->21142 .
> #testLessThan->17586 .
> #testPrintString->11809 .
> #testStringAsDateAndTime->30918
> }
>
I just fixed a glitch in the Jenkins job that keeps the 64-bit image updated, and
it occurred to me that I should try the UTC DateAndTime in a 64-bit image (image
format 68002, see http://build.squeak.org/job/Squeak%2064-bit%20image/).
The results surprised me. I was expecting the 64-bit image to be slower (which
I *think* is the case generally, based on the interactive feel). But the 64-bit image
is faster for the standard DateAndTime, and also for the UTC based DateAndTime.
The UTC DateAndTime on 64-bit image seems to be the fastest of any of the combinations
that I have tested, aside from some degradation in printString processing.
The standard Squeak DateAndTime yields this in a 64-bit image:
{
#testNow->8225 .
#testEquals->23880 .
#testGreaterThan->66041 .
#testLessThan->62482 .
#testPrintString->9473 .
#testStringAsDateAndTime->39384
}
And the new UTC implemention gives this in a 64-bit image:
{
#testNow->5494 .
#testEquals->24902 .
#testGreaterThan->17162 .
#testLessThan->14169 .
#testPrintString->11173 .
#testStringAsDateAndTime->28108
}
For reference, the original standard DateAndTime on a 32-bit image (see above) gave
me these numbers. Note the difference in the basic magnitude operations, testing for
one DateAndTime instance greater than or less than another.
{
#testNow->10143 .
#testEquals->30986 .
#testGreaterThan->80199 .
#testLessThan->75912 .
#testPrintString->10429 .
#testStringAsDateAndTime->44657
}
Dave
More information about the Squeak-dev
mailing list
|