From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 03EA5BB83 for ; Sat, 8 Jul 2006 17:25:49 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.6/8.13.6) with ESMTP id k68FPmAE000483 for ; Sat, 8 Jul 2006 17:25:48 +0200 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 RAA20417 for ; Sat, 8 Jul 2006 17:25:48 +0200 (MET DST) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.189]) by nez-perce.inria.fr (8.13.6/8.13.6) with ESMTP id k68FPlEd000475 for ; Sat, 8 Jul 2006 17:25:47 +0200 Received: by nf-out-0910.google.com with SMTP id a4so230395nfc for ; Sat, 08 Jul 2006 08:25:47 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=a0q+IPZ9MVmYmQPlLvJXw3bfwNsG+5VLcaNtGXbxs5Yl5VuD/w8ncDkiH2y4bBejVw3sju181k82regpy1C0u15NNa15jiIK3QZr1DH7RROXVyHCTzLEVkqqiJSPWn8Vsbf1dcJ/LXKWe869OwAj8hPAkDOzAbmIIabUyYV/YQ4= Received: by 10.49.29.11 with SMTP id g11mr2317090nfj; Sat, 08 Jul 2006 08:25:47 -0700 (PDT) Received: by 10.49.35.19 with HTTP; Sat, 8 Jul 2006 08:25:47 -0700 (PDT) Message-ID: Date: Sat, 8 Jul 2006 17:25:47 +0200 From: Tom To: caml-list@inria.fr Subject: Re: [Caml-list] Arrays and boxed/unboxed data In-Reply-To: <20060706135408.GA19446@localhost> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_122835_7515392.1152372347357" References: <20060706102721.c8ace71e.ocaml-erikd@mega-nerd.com> <20060706135408.GA19446@localhost> X-j-chkmail-Score: MSGID : 44AFCE7B.000 on nez-perce : j-chkmail score : X : 0/20 1 X-Miltered: at nez-perce with ID 44AFCE7C.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 44AFCE7B.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; arrays:01 unboxed:01 pointers:01 arrays:01 unboxed:01 integers:01 pointers:01 integers:01 caml-list:01 functions:01 functions:01 int:01 int:01 data:02 transform:04 X-Attachments: cset="UTF-8" cset="UTF-8" X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=HTML_00_10,HTML_MESSAGE, RCVD_BY_IP autolearn=disabled version=3.0.3 ------=_Part_122835_7515392.1152372347357 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline However, assuming you need a 2 dimensional array, that is int array array, the second array will be boxed (elements of the first array will be pointers to another array, but elements of these, secondary, arrays will be unboxed integers). You could probably use one dimensional array and use a modified getter and setter functions that would transform 2-D indeces into 1-D indeeces. In this way, all the elements would be unboxed. ------=_Part_122835_7515392.1152372347357 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline However, assuming you need a 2 dimensional array, that is int array array, the second array will be boxed (elements of the first array will be pointers to another array, but elements of these, secondary, arrays will be unboxed integers).

You could probably use one dimensional array and use a modified getter and setter functions that would transform 2-D indeces into 1-D indeeces. In this way, all the elements would be unboxed.
------=_Part_122835_7515392.1152372347357--