ocaml limitations

From: William Chesters (williamc@dai.ed.ac.uk)
Date: Mon Dec 13 1999 - 13:34:15 MET


Date: Mon, 13 Dec 1999 12:34:15 GMT
Message-Id: <15716.199912131234@turriff>
From: William Chesters <williamc@dai.ed.ac.uk>
To: caml-list@inria.fr
Subject: ocaml limitations
In-Reply-To: <199912130434.XAA12728@gs176.sp.cs.cmu.edu>

John Carol Langford writes:
> The performance problems from two limitations. The first is in the
> compiler and runtime - it's the limitation on the array size on 32 bit
> machines - I only have linux PC's available to work on.

I think this has been worked on by David McClain:
http://caml.inria.fr/pub/old_caml_site/caml-list/1041.html

> The second problem is a language failure - there is no 'short int'
> type in ocaml.

The underlying problem is that for important reasons of GC efficiency
etc., ocaml (like nearly all other GCd languages) works on word-sized
objects only, i.e. 32 or 64 bits. To support access to a smaller
granularity, like 16 bits, it's necessary to do something like how the
`string' type is implemented, with some slightly hacky arithmetic for
working out its length. I don't think that would be difficult to
duplicate for 16 bit numbers, seeing as how the compiler code is so
pretty but would have to be careful to use unsafe_get.



This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:29 MET