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 concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 76277BB83 for ; Thu, 6 Jul 2006 09:22:42 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id k667MhFX013526 for ; Thu, 6 Jul 2006 09:22:43 +0200 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 JAA07333 for ; Thu, 6 Jul 2006 09:22:41 +0200 (MET DST) Received: from smtp.syd.people.net.au (smtp.syd.people.net.au [218.214.225.98]) by concorde.inria.fr (8.13.6/8.13.6) with SMTP id k660RSdi018055 for ; Thu, 6 Jul 2006 02:27:31 +0200 Received: (qmail 12297 invoked from network); 6 Jul 2006 00:27:28 -0000 Received: from unknown (HELO coltrane.mega-nerd.net) (218.214.64.136) by smtp.syd.people.net.au with SMTP; 6 Jul 2006 00:27:28 -0000 Received: from coltrane (localhost [127.0.0.1]) by coltrane.mega-nerd.net (Postfix) with SMTP id E955D7B67 for ; Thu, 6 Jul 2006 10:27:21 +1000 (EST) Date: Thu, 6 Jul 2006 10:27:21 +1000 From: Erik de Castro Lopo To: caml-list@inria.fr Subject: Arrays and boxed/unboxed data Message-Id: <20060706102721.c8ace71e.ocaml-erikd@mega-nerd.com> Organization: Erik Conspiracy Secret Labs X-Mailer: Sylpheed version 2.2.6 (GTK+ 2.8.18; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 44ACBA43.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 44AC58F1.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; arrays:01 unboxed:01 ocaml:01 arrays:01 unboxed:01 enum:01 enum:01 ints:01 ints:01 define:01 algorithm:01 data:02 data:02 types:02 figuring:02 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 Hi all, I'm about to start some work on an algorithm which will need a quite large 2-D array of Ocaml ints. I assume that Arrays of ints will be unboxed. Is that correct? What about other types? For instance: type my_enum = A | B | C If I made an array of my_enum would that be unboxed? Is there any general rule that will tell me what is boxed and what is unboxed? If I define an Array of some data type is there a way of figuring this out? TIA, Erik -- +-----------------------------------------------------------+ Erik de Castro Lopo +-----------------------------------------------------------+ "I want to make sure (a user) can't get through ... an online experience without hitting a Microsoft ad." - Microsoft CEO, Steve Ballmer on the Microsoft search engine.