dazed by SortedCollection
Jon M. DeLaurier
jdelaurier at vanisle.net
Tue Sep 1 17:33:21 UTC 1998
Subject: Re: dazed by SortedCollection
Sent: 1/09/1998 9:28
To: squeak at cs.uiuc.edu
Thanks for these responses. I did not clue to the performance
requirements of real-life applications. All of mine are artificial
and academic. The only performance enhancement that I am concerned
about is to obtained more cycle speed.
Jon
>Subject: Re: dazed by SortedCollection
>Sent: 31/08/1998 14:01
>Received: 31/08/1998 18:41
>From: Patrick Logan, patrickl at servio.gemstone.com
<snip>
>For example, the #copyFrom:to: method makes an exact copy of the
>elements between some start and end index. The same sortBlock is used,
>so the ordering is guaranteed to be identical. The greater the number
>of elements in the copy, the more significant is the penalty to
>re-sort the elements that are known already to be sorted.
>
>Better to be able to copy the collection asserting that the order will
>be correct, without the performance penalty.
>
>--
>Patrick Logan mailto:patrickl at gemstone.com
>Voice 503-533-3365 Fax 503-629-8556
>Gemstone Systems, Inc http://www.gemstone.com
>[snip]
>
>> I am dazed and confused! Why would you want to add to a sorted collection
>> without sorting? It seems to me to be a canidate for the more general
>> collection class. So again why have an addLast: method in the
>> SortCollection
>> class??
>
>How about as a performace optimization when you know the item your adding
>*should* come last? (a logging function for example) Or maybe if you
>wanted to delay sorting until a specific time, but wanted to stick the
>elements in anyway. As long as when you *get* the items, or otherwise
>manipulate the collection, do you need it to be *actually* sorted. "Lazy
>sorting", if you will.
>
>Cheers,
>Bijan Parsia
-------------------------------------------------------------------------
| Jon M. DeLaurier | vox : 250.656.6176 |
| 2209 Bradford Av | |
| Sidney, B.C. V8L2C8 | |
| Canada | email: jdelaurier at vanisle.net |
-------------------------------------------------------------------------
| It is always darkest just before it gets black. (Dave Broadfoot 1996) |
-------------------------------------------------------------------------
More information about the Squeak-dev
mailing list
|