From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA16570 for caml-red; Wed, 10 Jan 2001 19:57:13 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA05115 for ; Wed, 10 Jan 2001 19:25:28 +0100 (MET) Received: from labrador.eecs.harvard.edu (labrador.eecs.harvard.edu [140.247.60.247]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f0AIPR523284 for ; Wed, 10 Jan 2001 19:25:27 +0100 (MET) Received: (from nr@localhost) by labrador.eecs.harvard.edu (8.9.3/8.9.3) id NAA17093 for caml-list@inria.fr; Wed, 10 Jan 2001 13:25:27 -0500 Date: Wed, 10 Jan 2001 13:25:27 -0500 From: Norman Ramsey Message-Id: <200101101825.NAA17093@labrador.eecs.harvard.edu> To: caml-list@inria.fr Subject: questions about costs of nativeint vs int Sender: weis@pauillac.inria.fr We're designing interfaces for tools that will sometimes have to manipulate 32-bit integers, but will often be able to make do with the limited precision provided by the int type. I would love to get some information about the relative cost of int vs nativeint in both parameter passing and datatype representation. For example, what are the relative costs (e.g., memory requirements) of these two definitions? type loc = Cell of char * int * width | Slice of ... type loc' = Cell of char * nativeint * width | Slice of ... As another example, what are the costs of calling these functions: type t val add : rd:int -> rs1:int -> rs2:int -> t val add' : rd:nativeint -> rs1:nativeint -> rs2:nativeint -> t To extend the question, what happens if I use int32 or int64 in place of nativeint? Finally, a procedural question: should I be posting these sorts of questions to comp.lang.ml instead of sending them to caml-list@inria.fr? Thanks in advance for any help! Norman