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 UAA15207; Sat, 3 May 2003 20:44:00 +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 UAA14836 for ; Sat, 3 May 2003 20:43:59 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from mailf.telia.com (mailf.telia.com [194.22.194.25]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h43IhwH09829 for ; Sat, 3 May 2003 20:43:58 +0200 (MET DST) Received: from d1o849.telia.com (d1o849.telia.com [213.66.248.241]) by mailf.telia.com (8.12.9/8.12.9) with ESMTP id h43IhkfL022319; Sat, 3 May 2003 20:43:48 +0200 (CEST) X-Original-Recipient: caml-list@inria.fr Received: from gateway (h199n1fls34o849.telia.com [213.67.121.199]) by d1o849.telia.com (8.10.2p2/8.10.1) with ESMTP id h43IhiD29861; Sat, 3 May 2003 20:43:44 +0200 (CEST) From: "Mattias Waldau" To: "'Vitaly Lugovsky'" Cc: , "'Ocaml Mailing List'" Subject: RE: [Caml-list] Efficiency of 'a list Date: Sat, 3 May 2003 20:43:41 +0200 Message-ID: <03ea01c311a3$ee573560$0200a8c0@gateway> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.3416 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal In-Reply-To: X-Spam: no; 0.00; mattias:01 waldau:01 caml-list:01 vitaly:01 lugovsky:01 ontil:01 ihep:01 hashtbl:01 hash:01 ocaml:01 syntax:02 essentially:02 data:03 efficiency:05 efficient:05 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk *** Do not use lists, there is always a better datastructure *** > From: Vitaly Lugovsky [mailto:vsl@ontil.ihep.su] > OCaml already have Hashtbl implementation. I know Ocaml has hash tables. Ocaml has ALL the datastructures that are needed to create efficient programs. However, lists are the data structure that it easiest to use, since there is special syntax for it, and therefor many novices use it. The result of this is that you get all these questions in this forum complaining about performance. Most of the questions would never have been asked if the author would have used the correct datastructure, mostly Hash/Map or Set. The reason novices use them is that they think that since there is special syntax for lists, this must be the preferred way. We all know that it isn't the preferred solution. I have been doing pure programming since MACLISP on the TOPS-20, and the a large percentage of performance problems can be traced back to IMAPPROPRIATE USE OF LISTS. Therefor my previous post where I essentially say: *** Do not use lists, there is always a better datastructure *** ------------------- 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