[squeak-dev] UTCDateAndTime updated for Squeak 4.6/5.0
Levente Uzonyi
leves at elte.hu
Sun May 24 21:22:48 UTC 2015
On Sun, 24 May 2015, David T. Lewis wrote:
> UTCDateAndTime is a UTC based implementation of class DateAndTime with
> one instance variable representing the magnitude of the point in time,
> and another representing local time zone offset.
>
> I recommend loading with the SAR from http://wiki.squeak.org/squeak/6197,
> as maintaining this in Montecello is problematic.
>
> After the 4.6/5.0 release, I would like to suggest moving Chronology out
> of the Kernel package into its own package, so that changes in Chronology
> can be maintained in Montecello without conflicting with the rest of Kernel.
>
> Spur notes: The Spur image provides a huge performance when loading this
> set of changes. There are two steps in the loading process in which all
> DateAndTime instances need to be #becomed into new instances. This is
> painfully slow in the traditional image (with or without Cog), and it is
> amazing fast in Spur.
Similar speed can be achieved in V3 images (on any VM), if all instances
are exchanged in one shot. In LX-2.2.cs:
| oldInstances newInstances |
oldInstances := DateAndTime allInstances, TimeStamp allInstances.
newInstances := oldInstances collect: [ :each |
each class == DateAndTime
ifTrue: [ each asLXDateAndTime ]
ifFalse: [ each asLXTimeStamp ] ].
oldInstances elementsForwardIdentityTo: newInstances.
And in LX-4.1.cs:
| oldInstances newInstances |
oldInstances := LXDateAndTime allInstances, LXTimeStamp allInstances.
newInstances := oldInstances collect: [ :each |
each class == LXDateAndTime
ifTrue: [ each asDateAndTime ]
ifFalse: [ each asTimeStamp ] ].
oldInstances elementsForwardIdentityTo: newInstances.
Levente
>
> That said, there is a bug in the Spur VM (easily resolved I think) that
> produces incorrect time values. I'll post note about that on vm-dev. I
> would not recommend using UTCDateAndTime in Spur yet, other than just
> to see how amazingly fast it is compared to loading the same thing in
> a non-Spur image.
>
> Dave
>
>
>
More information about the Squeak-dev
mailing list
|