Version française
Home     About     Download     Resources     Contact us    
Browse thread
Arrays and boxed/unboxed data
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Erik de Castro Lopo <ocaml-erikd@m...>
Subject: Arrays and boxed/unboxed data
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.