dazed by SortedCollection
Patrick Logan
patrickl at servio.gemstone.com
Mon Aug 31 22:01:00 UTC 1998
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??
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
More information about the Squeak-dev
mailing list
|