remove: and GOODS -- identity problems?
Avi Bryant
avi at beta4.com
Tue Jul 6 18:09:48 UTC 2004
On Jul 6, 2004, at 10:56 AM, Sebastian Sastre wrote:
> What about replacing Sets with TreeSets ?
TreeSets require some kind of sort key - so the objects you put in a
TreeSet don't have to implement #hash, but they do have to be able to
provide some kind of immutable Magnitude object to sort them by, which
needs to have a good spread of values or you'll degenerate into linear
search. So it comes to the same thing.
However, yes, for large collections, I would definitely recommend using
TreeSet instead of Set. You'll get many fewer write conflicts.
Avi
More information about the Squeak-dev
mailing list
|