logo       

Re: [FIX] SortedCollectionFix-sr: msg#00754

lang.smalltalk.squeak.general

Subject: Re: [FIX] SortedCollectionFix-sr

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@xxxxxxxxx)
"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





<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise