caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Gripes with array
@ 2004-09-09  2:10 Jon Harrop
  2004-09-09  5:08 ` Ville-Pertti Keinonen
                   ` (3 more replies)
  0 siblings, 4 replies; 31+ messages in thread
From: Jon Harrop @ 2004-09-09  2:10 UTC (permalink / raw)
  To: caml-list


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


^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2004-09-13  7:02 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-09  2:10 [Caml-list] Gripes with array Jon Harrop
2004-09-09  5:08 ` Ville-Pertti Keinonen
2004-09-09  7:17 ` Jean-Christophe Filliatre
2004-09-09  8:23   ` Richard Jones
2004-09-09  9:08     ` Olivier Andrieu
2004-09-09 12:08       ` Basile Starynkevitch [local]
2004-09-09 12:31         ` Damien Doligez
2004-09-09 10:42     ` Gerd Stolpmann
2004-09-09  9:37 ` Damien Doligez
2004-09-09 10:34   ` Jean-Christophe Filliatre
2004-09-09 12:15     ` Igor Pechtchanski
2004-09-09 13:01   ` Brian Hurt
2004-09-09 20:08     ` [Caml-list] 32-bit is sticking around Brandon J. Van Every
2004-09-09 21:04       ` Jon Harrop
2004-09-11 15:30         ` Lars Nilsson
2004-09-11 16:24           ` [off topic] " David MENTRE
2004-09-11 17:52             ` Lars Nilsson
     [not found]           ` <200409111656.11952.jon@jdh30.plus.com>
2004-09-11 17:47             ` Lars Nilsson
2004-09-09 16:58   ` [Caml-list] Gripes with array Jon Harrop
2004-09-10  5:56     ` Array.init (was [Caml-list] Gripes with array) Christophe Raffalli
2004-09-10  8:53       ` Richard Jones
2004-09-10 14:50         ` Damien Doligez
2004-09-13  7:02       ` Christophe Raffalli
2004-09-10 13:45     ` [Caml-list] Gripes with array Damien Doligez
2004-09-11  1:43       ` skaller
2004-09-11  3:16         ` skaller
2004-09-11 14:36       ` Jon Harrop
2004-09-11 20:53         ` Damien Doligez
2004-09-12 15:33           ` Jon Harrop
2004-09-12 16:07             ` Basile Starynkevitch [local]
2004-09-10 23:48 ` brogoff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).