[FIX] SortedCollectionFix-sr

Stephan Rudlof squeak-dev at lists.squeakfoundation.org
Fri Sep 27 23:36:54 UTC 2002


Andreas Raab wrote:
>>after my correction in
>>  correction [was: Re: [FIX] SortedCollectionFix-sr]
>>, I think the reason for the performance loss in the 
>>'unoptimized' version
>>must be the temporarily construction of a *Set* of keys  (an
>>OrderedCollection would be cheaper) in:
> 
> 
> Well, then let's make it something different ;-)
> 
> keysSortedSafely
> 	^SortedCollection
> 		withAll: (Array streamContents:[:s| self keysDo:[:key| s
> nextPut: key]])
> 		sortBlock:[...]
> 
> Cheers,
>   - Andreas
> 
> 
> 

This is good (for others: understandable, if you have read a former mail to
Andreas in this thread);

for all Dictionaries: #(27838 27017) #(27735 26815) #(27945 27110)

for the biggest one:  #(1350 1299 952) #(1349 1299 952) #(1351 1299 952)

Now the difference is negligable.

Thanks!


Greetings,

Stephan
-- 
Stephan Rudlof (sr at evolgo.de)
   "Genius doesn't work on an assembly line basis.
    You can't simply say, 'Today I will be brilliant.'"
    -- Kirk, "The Ultimate Computer", stardate 4731.3




More information about the Squeak-dev mailing list