From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.4 required=5.0 tests=AWL,DNS_FROM_RFC_POST, SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 68154BBC4 for ; Tue, 17 Mar 2009 14:13:18 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AroBAEI/v0lKfU4ZkGdsb2JhbACMfYgbPwEBAQEJCQwHEQOuAgWBBo9UAQMBA4N5BocX X-IronPort-AV: E=Sophos;i="4.38,378,1233529200"; d="scan'208";a="24447107" Received: from ey-out-2122.google.com ([74.125.78.25]) by mail3-smtp-sop.national.inria.fr with ESMTP; 17 Mar 2009 14:12:49 +0100 Received: by ey-out-2122.google.com with SMTP id 4so7751eyf.15 for ; Tue, 17 Mar 2009 06:12:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=xWS94GwLyJtAJA1/RVVizXo+DevwGDEF5y6ZzEExMNI=; b=aIPUdZUIByTKVbnAS3aVsRzMLjNltviawS4HT525d4D4YsJ6YVglZYpbWfXiPSH2zz ClDdc57KKBlMBIrsjLIYsyypLEBR5a75rFzIzosBFZVxy/m3tOOX/AJv8rkGL3rUXO2D Ca+gXaoaAC0DmLlnv9bQQQLLv9itW5w3I2Z8E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Ke2gpenk0gFAr+gkucjotrt0Er30TI2bSLm/8SJZgEok8NpjnpmPDRgiKMfrZ9pFec qkuKXdeTXuAm117PDBhfKNj/KR98QjPgbhrzaif+zCcgvSqnQZ4lRqOBLBUqowE+335O FePpKYnDyxY/cCSSKrUwnptBNkoN4j48R4MZg= MIME-Version: 1.0 Received: by 10.210.10.8 with SMTP id 8mr4480391ebj.80.1237295569365; Tue, 17 Mar 2009 06:12:49 -0700 (PDT) In-Reply-To: References: Date: Tue, 17 Mar 2009 09:12:49 -0400 Message-ID: <9d3ec8300903170612t7f611961r6ad1f66c01f062fe@mail.gmail.com> Subject: Re: [Caml-list] Int64 comparison From: Till Varoquaux To: Elnatan Reisner Cc: Caml Mailing List Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; pervasives:01 functor:01 beginner's:01 ocaml:01 bug:01 2009:98 polymorphic:01 beginners:01 wrote:01 caml-list:01 caml-list:01 functions:01 int:01 int:01 bin:01 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 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 >