Mantis: 0000474 AccurateDateAndTime harvested?
denker at iam.unibe.ch
Fri Oct 13 08:46:31 UTC 2006
On 13.10.2006, at 06:09, Keith Hodges wrote:
> Giovanni Corriga wrote:
>> Il giorno gio, 12/10/2006 alle 21.06 +0200, stephane ducasse ha
>>> I will release RC2.
>>> But we should not add more to it because this will never stop.
>> yes, Yes, YES. Unless it's a serious showstopper, it should be
>> punted to
>> either 3.9.1 or 3.10.
> I agree, but I think some improvements can be made...
> cc from note in mantis.
> I made a variant which effectively uses the millisecond clock for
> the time, and the second clock for the date. I do this in
> anticipation of the day when the vm primitives give us useful
> milliseconds (or nanoseconds) since midnight. [ Is this likely to
> happen? ]
> I also discovered that avoiding the use of Duration in the
> instantiation of DateAndTime improves performance by a factor of x3
> on Andreas' observation. Making an accessor to set the instance
> vars directly without normalizing (I don't understand the purpose
> of normalising) boosts that to a factor of x4.
> Then removing the semaphore and use of the class var LastTicks
> improves speed up to a pretty wizzy 90x the original.
> Perhaps for those of us who dont care about this
> (DateAndTime now) <= (DateAndTime now) is always true*
> would prefer the quicker version which I have christened.
And there is http://bugs.impara.de/view.php?id=4669
0004669: [ENH] TimeForSpeed
"DateAndTime now" is about 6 times faster and "Date today" 4 times.
The full chronology test suite runs almost 2 times faster. See
preamble for a do-it that shows this (run before and after installing
More information about the Squeak-dev