Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] troubling results from profiling: compare_val
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Alain.Frisch@e...
Subject: RE: [Caml-list] troubling results from profiling: compare_val
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