dolphinsmalltalk / Dolphin

Dolphin Smalltalk Core Image
MIT License
301 stars 58 forks source link

Resolve #1093: Optimization of Collection>>#distinct #1107

Closed blairmcg closed 3 years ago

blairmcg commented 3 years ago

As discussed in #1093, use Collection>>#approxSize to resize the collection as it is intended for this kind of purpose, and is expected to have a constant time implementation (i.e. it should not count the elements).

Collection>>#distinct is already adequately covered with unit tests