caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Alain.Frisch@ens.fr
To: Mattias Waldau <mattias.waldau@abc.se>
Cc: "'David Monniaux'" <David.Monniaux@ens.fr>,
	"'Liste CAML'" <caml-list@inria.fr>
Subject: RE: [Caml-list] troubling results from profiling: compare_val
Date: Wed, 26 Feb 2003 22:39:18 +0100 (MET)	[thread overview]
Message-ID: <Pine.SOL.4.44.0302262234170.14903-100000@clipper.ens.fr> (raw)
In-Reply-To: <006f01c2ddc8$7faff1b0$0a00a8c0@gateway>

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


      reply	other threads:[~2003-02-27 15:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-26 17:03 David Monniaux
2003-02-26 18:54 ` Mattias Waldau
2003-02-26 21:39   ` Alain.Frisch [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.SOL.4.44.0302262234170.14903-100000@clipper.ens.fr \
    --to=alain.frisch@ens.fr \
    --cc=David.Monniaux@ens.fr \
    --cc=caml-list@inria.fr \
    --cc=mattias.waldau@abc.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).