Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
32- and 64-bit performance
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Ville-Pertti Keinonen <will@e...>
Subject: Re: [Caml-list] 32- and 64-bit performance
On Wed, 2005-03-30 at 13:53 +0100, Jon Harrop wrote:

> This raises the question of exactly which OCaml types incur 64-bit quantities 
> in the run-time. My guess:

Basically everything except strings and Bigarrays.

>   records (except those with all-float fields)

They are 64-bit, but for records and arrays of floats, the
representation is essentially the same as on 32-bit systems (except that
the header word is bigger, of course), so you don't really lose much,
plus you avoid the loss in performance due to an average of half of all
floats being misaligned (which is pretty significant).

> But isn't there quite a low limit on the number of constant variant type 
> constructors allowed? So maybe they're squeezed into something a little 
> smaller...

I think the limitation is simply due to non-constant variant
constructors, which store the tag in the header word.  Constant
constructors are simply ints.