From: Amit D. <ami...@gm...> - 2005-10-23 18:45:58
|
On 10/22/05, sejourne_kevin <sej...@ya...> wrote: > When ordering isn't need I use this one : I think you misunderstood me: I'm talking about cases where you can't do th= e *first* sort, not the second. Although Pervasives.compare defines a total order over the *physical* representation of a datastructure, in some cases = ( e.g. if you're writing a math application), there may be instances when you don't want an ordering over the *semantic* representation of the elements elements: you only want equality. In these cases, you'd be better off with the O(n^2) version. But then maybe I'm being anal... (but then as Brian pointed out, if you hav= e a meaningful ordering over elements, why not just use a set?) -Amit |