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
> 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 ?

This is true, even if you have as little as two float fields.
However, there would be some overhead when accessing one of these
fields, in the case where you need the field value to remain boxed
(i.e. to pass it to a Caml function).  Also, this appraoch sure would
not simplify the compiler :-)

- 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