English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 2006-07-06 (07:22)
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?

  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.