mthornton at optrak.co.uk
Wed Sep 30 07:21:51 PDT 2009
Gene Ray wrote:
> I benchmarked this, and appear to have arrived at
> different results than you. I used lists/sets of 10-character strings
> of lowercase letters, which is close a lot of use-cases I've seen, and
> ran 10^7 trials for each implementation (I used HashSet/ArrayList).
Obujects with cheaper equals methods (e.g. Integer) will probably give
> is not the only concern. "Sets" in java represent the mathematical
> notion of a set; lists do not, and pretending that the latter is
> equivalent to the former is a logical error regardless of common practice.
As a mathematician I do tend to use Set where that is the logical
requirement, but I suspect that Stephen's ordinary Joe programmers are
less fussy about such matters.
More information about the coin-dev