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 EAA02787; Thu, 9 Sep 2004 04:14:38 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id EAA03738 for ; Thu, 9 Sep 2004 04:14:37 +0200 (MET DST) Received: from ptb-relay02.plus.net (ptb-relay02.plus.net [212.159.14.213]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id i892Eaq9022652 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 9 Sep 2004 04:14:36 +0200 Received: from [80.229.56.224] (helo=chetara) by ptb-relay02.plus.net with esmtp (Exim) id 1C5ESK-000Ao2-4A for caml-list@inria.fr; Thu, 09 Sep 2004 02:14:36 +0000 From: Jon Harrop To: caml-list@inria.fr Subject: [Caml-list] Gripes with array Date: Thu, 9 Sep 2004 03:10:29 +0100 User-Agent: KMail/1.6.2 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200409090310.29295.jon@jdh30.plus.com> X-Miltered: at nez-perce with ID 413FBC8C.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; non-float:01 pointers:01 arrays:01 arrays:01 -bit:01 garbage:01 polymorphic:01 collector:02 let:04 array:04 array:04 functions:05 init:05 init:05 cheers:06 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I'm increasingly finding the outrageously finite size limit of arrays to be a pain. In particular, I'm peeved that the size limit is itself a function of the type which, therefore, makes writing polymorphic functions over arrays nay-on impossible (e.g. to make an array of maximum-sized arrays). Can anything be done about this? Am I right in thinking that the maximum non-float array size on a 64-bit machine is 18,014,398,509,481,983? Also, can Array.init be made to fill the elements only once? This would make quite a few things twice as fast (Indeed, I'd always assumed that this was the point of having Array.init, having read some of Skaller's previous ramblings ;-). Array.copy could then be written more succinctly and efficiently in terms of Array.init as: let copy a = init (length a) (fun i -> a.(i)) Does anyone have any pointers to information about the origin of the size limit for arrays? I assume it is something to do with the garbage collector using a fixed-size tag instead of a variable-size one but I'd be interested in the details. Cheers, Jon. ------------------- 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