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: Xavier Leroy <xavier.leroy@i...>
Subject: Re: [Caml-list] boxing of floats in records/classes
> 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.

- Xavier Leroy
-------------------
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