Mantis: 0000474 AccurateDateAndTime harvested?
keith_hodges at yahoo.co.uk
Fri Oct 13 04:09:14 UTC 2006
Giovanni Corriga wrote:
> Il giorno gio, 12/10/2006 alle 21.06 +0200, stephane ducasse ha scritto:
>> 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.
Send instant messages to your online friends http://uk.messenger.yahoo.com
More information about the Squeak-dev