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 MAA04598; Mon, 26 Apr 2004 12:14:37 +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 MAA04788 for ; Mon, 26 Apr 2004 12:14:36 +0200 (MET DST) Received: from aomori.annexia.org (annexia.force9.co.uk [212.56.101.183]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i3QAEZYM017132 for ; Mon, 26 Apr 2004 12:14:36 +0200 Received: from rich by aomori.annexia.org with local (Exim 3.36 #1 (Debian)) id 1BI38F-0002Ha-00 for ; Mon, 26 Apr 2004 11:14:35 +0100 Date: Mon, 26 Apr 2004 11:14:35 +0100 Cc: caml-list Subject: Re: [oliver: Re: [Caml-list] Should be INSIDE STANDARD-LIB: Hashtbl.keys] Message-ID: <20040426101435.GA8694@redhat.com> References: <20040423200923.GA271@first.in-berlin.de> <200404240546.17082.jdh30@cam.ac.uk> <1082919271.3944.0.camel@qrnik> <200404252106.34024.jdh30@cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200404252106.34024.jdh30@cam.ac.uk> User-Agent: Mutt/1.5.5.1+cvs20040105i From: Richard Jones X-Miltered: at = by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; oliver:01 caml-list:01 hashtbl:01 2004:99 partitioned:01 atoms:01 atoms:01 ltd:98 ocaml:01 caml:01 int:01 wrote:03 stl:03 stl:03 perl:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sun, Apr 25, 2004 at 09:06:33PM +0100, Jon Harrop wrote: > In case anyone is interested, my peeve about carrying the length of a list > around inside the list in the case of the STL came from my use of a data > structure for molecular dynamics: The atomic structure is described by > particle coordinates within a cubic box under periodic boundary conditions. > Conventionally, the box is partitioned into voxels so that you can lookup > neighbouring atoms efficiently. Each voxel contains a list of atoms within > the voxel. I was often using ~10^6 voxels, so the STL list was carrying 4Mb > of unecessary data with my data structure. Don't you think that this is a rather special case, and probably you should have built your own data structure? For general purpose programming having the extra int (in STL) probably made sense [not that I've used C++ for years, and I don't think I'll be using it again]. Rich. -- Richard Jones. http://www.annexia.org/ http://www.j-london.com/ Merjis Ltd. http://www.merjis.com/ - improving website return on investment Learning Objective CAML for C, C++, Perl and Java programmers: http://www.merjis.com/richj/computers/ocaml/tutorial/ ------------------- 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