From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA32415 for caml-redistribution; Mon, 13 Dec 1999 17:27:22 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id NAA11688 for ; Mon, 13 Dec 1999 13:34:09 +0100 (MET) Received: from postbox.dai.ed.ac.uk (postbox.dai.ed.ac.uk [129.215.41.196]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id NAA18965 for ; Mon, 13 Dec 1999 13:34:07 +0100 (MET) Received: from turriff (turriff.dai.ed.ac.uk [129.215.41.225]) by postbox.dai.ed.ac.uk (8.9.3/8.9.3) with SMTP id MAA12505; Mon, 13 Dec 1999 12:33:48 GMT Date: Mon, 13 Dec 1999 12:34:15 GMT Message-Id: <15716.199912131234@turriff> From: William Chesters MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: caml-list@inria.fr Subject: ocaml limitations In-Reply-To: <199912130434.XAA12728@gs176.sp.cs.cmu.edu> References: <199912130434.XAA12728@gs176.sp.cs.cmu.edu> X-Mailer: VM 6.22 under Emacs 19.34.1 Sender: weis 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/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.