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
[Caml-list] boxing of floats in records/classes
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-09-26 (11:14)
From: Berke Durak <durak@l...>
Subject: Re: [Caml-list] boxing of floats in records/classes
On Thu, Sep 26, 2002 at 10:01:03AM +0200, Xavier Leroy wrote:
> > Quick question: are mutable float fields in records or classes
> boxed?
> Yes, with the exception of records that have all fields of type float.
> In the latter case, the record is represented like a float array, with
> each float unboxed.
> > If so, why?
> Mainly because the runtime system and garbage collector support either
> blocks of pointers or blocks of unboxed data, but not mixed blocks
> containing both pointers and unboxed data.

Would it then be false to assume that if you have many floats in a record,
grouping them into a subrecord would reduce the boxing overhead ?
Berke Durak
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: