From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA13744; Thu, 27 Feb 2003 16:03:08 +0100 (MET) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA13578 for caml-list@pauillac.inria.fr; Thu, 27 Feb 2003 16:03:07 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id WAA21825 for ; Wed, 26 Feb 2003 22:39:21 +0100 (MET) Received: from nef.ens.fr (nef.ens.fr [129.199.96.32]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h1QLdKT02759 for ; Wed, 26 Feb 2003 22:39:20 +0100 (MET) Received: from clipper.ens.fr (clipper-gw.ens.fr [129.199.1.22]) by nef.ens.fr (8.10.1/1.01.28121999) with ESMTP id h1QLdKM56877 ; Wed, 26 Feb 2003 22:39:20 +0100 (CET) Received: from localhost (frisch@localhost) by clipper.ens.fr (8.12.3/jb-1.1) id h1QLdJdL003941 ; Wed, 26 Feb 2003 22:39:19 +0100 (MET) X-Authentication-Warning: clipper.ens.fr: frisch owned process doing -bs Date: Wed, 26 Feb 2003 22:39:18 +0100 (MET) From: Alain.Frisch@ens.fr X-X-Sender: frisch@clipper.ens.fr Reply-To: Alain.Frisch@ens.fr To: Mattias Waldau cc: "'David Monniaux'" , "'Liste CAML'" Subject: RE: [Caml-list] troubling results from profiling: compare_val In-Reply-To: <006f01c2ddc8$7faff1b0$0a00a8c0@gateway> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-milter (http://amavis.org/) Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wed, 26 Feb 2003, Mattias Waldau wrote: > If you know that you have numbers, in many cases you can use > - (minus) as comparation operator. That speeds things up. Beware of the modulo semantics of the arithmetic operator (-) ! # List.sort (fun x y -> x - y) [min_int;max_int];; - : int list = [1073741823; -1073741824] -- Alain ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners