Re: [Caml-list] Int64 comparison

2009-03-17 Thread Jérémie Dimino
Le mardi 17 mars 2009 à 08:51 -0400, Elnatan Reisner a écrit : > 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. Yes, int64s and int32s are represented in memory by

Re: [Caml-list] Int64 comparison

2009-03-17 Thread Till Varoquaux
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, 200

[Caml-list] Int64 comparison

2009-03-17 Thread Elnatan Reisner
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 r