Max array length in OCaml

What's the max array length in OCaml.

asked Aug 11, 2013 by anonymous

1 Answer

 
Best answer

You can check it by:

# Sys.max_array_length;;

On 64-bit machine:

# Sys.max_array_length;;
- : int = 18014398509481983

On a 32-bit machne:

# Sys.max_array_length;;
- : int = 4194303

This is due to the memory representation of arrays. 64 Bit machines are better here.

And AFAIK, OCaml was developed with 64 Bit machines in mind;
the developers of OCaml thought, they will spread much faster.

-- http://tech.groups.yahoo.com/group/ocaml_beginners/message/13920

answered Aug 11, 2013 by anonymous

Please log in or register to answer this question.

Related questions

1 answer
asked Apr 10, 2013 by anonymous
1 answer
1 answer
asked Dec 14, 2013 by anonymous
1 answer
1 answer
asked Aug 11, 2013 by anonymous
1 answer
asked Mar 11, 2013 by anonymous
Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...