English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
ocaml limitations
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1999-12-13 (16:27)
From: William Chesters <williamc@d...>
Subject: ocaml limitations
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:

 > 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.