[squeak-dev] UTCDateAndTime updated for Squeak 4.6/5.0

Levente Uzonyi leves at elte.hu
Wed May 27 01:24:17 UTC 2015


On Tue, 26 May 2015, David T. Lewis wrote:

> On Tue, May 26, 2015 at 03:39:01AM +0200, Levente Uzonyi wrote:
>> On Mon, 25 May 2015, David T. Lewis wrote:
>>
>>> On Mon, May 25, 2015 at 10:48:20AM -0400, David T. Lewis wrote:
>>>> On Sun, May 24, 2015 at 11:22:48PM +0200, Levente Uzonyi wrote:
>>>>> 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,
>>>>
>>>> Thank you! I was not aware of that.
>>>
>>> I updated the SAR at http://wiki.squeak.org/squeak/6197. Indeed it now
>>> loads
>>> very quickly in a V3 image.
>>
>> Cool. I've got another change set, which makes instance creation more than
>> twice as fast:
>> http://leves.web.elte.hu/squeak/DateAndTimeCreationSpeedup.1.cs
>
> Thanks Levente,
>
> Added to the SAR at http://wiki.squeak.org/squeak/6197 and to the repository
> at http://ss3.gemstone.com/ss/UTCDateAndTime.html. I also updated #hasUtcPrim
> for startup processing to use your #primPosixMicrosecondClockWithOffset change.

Thanks Dave!

Levente


More information about the Squeak-dev mailing list