Loading ...
Sorry, an error occurred while loading the content.

13769Re: "ocaml_beginners"::[] what limits Sys.max_string_length and can it be increased ?

Expand Messages
  • oliver
    Feb 20, 2013
      On Wed, Feb 20, 2013 at 03:52:56PM -0800, Sergei Steshenko wrote:
      >
      >
      > Even though my desktop (but not laptop) CPU is capable of running 64 bits,
      > I still prefer 32 bit versions of Linux for various practical reasons.
      [...]


      Initially OCaml was written/designed with 64 Bit systems in mind.
      Later, when it shows up that 32 Bit machines will stay on market for quite long time,
      OCaml was "backported".

      I think it was Xavier Leroy who answered this many years ago,
      when I asked the same question like you.


      Let us remember: HP-workstations, HP 9000 series has had 32 Bit processors.
      It was in 1982.

      As you may now, we have 2013 now.

      Using 32 Bit machines today is using ancient technology.
      The big vendors of Hardware and Software, which so often
      tell us, that they are innovative and provide newest technology,
      has thwarted the progress over decades.

      There is no excuse for this.
      Even embedded systems do have 8, 16 or 32 Bit processors.


      Fronm the manual:

      Character strings

      String values are finite sequences of characters. The current implementation
      supports strings containing up to 2^24 − 5 characters (16777211 characters);
      on 64-bit platforms, the limit is 2^57 − 9.

      http://caml.inria.fr/pub/docs/manual-ocaml-4.00/manual010.html#toc40



      >
      > Could you shed some light on data representation in OCaml ? AFAIK integers
      > are 31 rather than 32 bits - which according to my (naive ?) understanding
      > should limit things from 4G to 2G. And that would be OK for me.
      >
      > But why 16M ?


      I also found this stuff here:

      https://sympa.inria.fr/sympa/arc/caml-list/2003-01/msg00041.html

      http://rwmj.wordpress.com/2009/08/05/ocaml-internals-part-2-strings-and-other-types/


      I think for just using OCaml, this does not matter.
      Just use it as is.
      But you asked for some information.

      HTH

      Ciao,
      Oliver
    • Show all 6 messages in this topic