[ENH] Faster DateAndTime>>dayOfYear ([er][cd][su][sm])

Brent Pinkney brent.pinkney at aircom.co.za
Sat Jan 29 08:40:13 UTC 2005


Hi,

 From the preamble:

This enhancement was contributed by Dan Ingalls, I have just packaged it  
up as an enhancement and confirmed it passes all exising tests.

It replaces the implementation of DateAndTime>>dayOfYear to speed it up by  
a factor of 80.

All 394 test cases in the Kernel-Chronology Tests category succeed in a  
3.9a-6531 image.

	now := DateAndTime now.
	[ 10000 timesRepeat: [ now dayOfYear] ] timeToRun

	Results:		2694 milliseconds with old code, 33 milliseconds with new code.

It should be imcluded in 3.9 soonest.

Thanks

Brent
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fasterDayOfYear-brp.1.cs.gz
Type: application/x-gzip
Size: 676 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20050129/dc9986c5/fasterDayOfYear-brp.1.cs.bin


More information about the Squeak-dev mailing list