Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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 caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners