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 SAA20597; Fri, 23 Apr 2004 18:04:12 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 SAA20571 for ; Fri, 23 Apr 2004 18:04:11 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i3NG47YM031820; Fri, 23 Apr 2004 18:04:07 +0200 Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA20391; Fri, 23 Apr 2004 18:04:07 +0200 (MET DST) Date: Fri, 23 Apr 2004 18:04:07 +0200 From: Xavier Leroy To: jrouquie@ens-lyon.fr Cc: caml-list@inria.fr Subject: Re: [Caml-list] Should be INSIDE STANDARD-LIB: Hashtbl.keys Message-ID: <20040423180407.A20341@pauillac.inria.fr> References: <20040421011904.GA1411@first.in-berlin.de> <20040423145141.B3686@pauillac.inria.fr> <40891494.5030508@ens-lyon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <40891494.5030508@ens-lyon.org>; from jean-baptiste.rouquier@ens-lyon.org on Fri, Apr 23, 2004 at 03:05:24PM +0200 X-Miltered: at concorde by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 hashtbl:01 data:03 structure:06 i'm:07 keys:08 perhaps:09 inside:10 remove:89 sort:11 U6:88 wrong:12 enough:12 leroy:12 leroy:12 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > Perhaps I'm all wrong, but when I have to get rid of repetitions in a > list, I first sort it in O(n log n), then remove the repetitions in O(n). > Jean-Baptiste. OK, fair enough :-) The point I was trying to make (not very well, I agree) is that "list without repetition" or "sorted list without repetition" is often not the best data structure for the job. - Xavier Leroy ------------------- 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