[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Till Varoquaux <till.varoquaux@g...> |
| Subject: | Re: [Caml-list] Int64 comparison |
Taken from Int64.ml: let compare (x: t) (y: t) = Pervasives.compare x y compare seems to be there for functor applications (e.g. Set.Make needs it). I would use standard comparison; it should be exactly the same except it will be more legible and might be a tad faster. Till On Tue, Mar 17, 2009 at 8:51 AM, Elnatan Reisner <elnatan@cs.umd.edu> wrote: > Do the polymorphic ordering functions -- (<), (>), etc. -- correspond to the > numerical ordering for Int64s and Int32s? I assume so, but I didn't see this > specified anywhere. > > If the answer is 'yes', is there a reason I should prefer > Int64.compare n1 n2 < 0 > to > n1 < n2 > ? If there's no specific reason the first is better (and I don't see why it > would be), I definitely prefer the second. > -Elnatan > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs >