Browse thread
[Caml-list] unboxing of unary datatypes
-
Hal Daume III
-
Nicolas Cannasse
-
Florian Hars
- Nicolas Cannasse
-
Florian Hars
- Fabrice Le Fessant
-
Nicolas Cannasse
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2003-01-14 (14:12) |
From: | Nicolas Cannasse <warplayer@f...> |
Subject: | Re: [Caml-list] unboxing of unary datatypes |
> No, I think he sees something different here: The compiler does in fact > optimize out the constructor and then operates directly on the value (which, in > this case, is a boxed float). But it does not perform the special float > optimizations it does on values of the types float, float array and > records like { x: float; y: float; ... (* All fields are floats *)} (but not on > tupels and sum types containing floats). > Yes, of course. What I wanted to say here is that such representation compiler optimisations have to be documented and somehow normalized in order to be able to interface OCaml with C. As for floats array, there is a description of how they are handled in the Manual chapter 17.3.3. As the case of only-one-constructor is not documented, then there is no optimisation :) Nicolas Cannasse ------------------- 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