rossb...@mpi-sws.org writes:
Sylvain Le Gall sylv...@le-gall.net:
This is not about optimized compiler in this case but about data
representation. Even if you use an optimized compiler (which is not
really the case with ocamlopt), you won't change datastructure
representation to optimize.
Edgar Friendly thelema...@gmail.com writes:
On 05/04/2010 07:53 AM, Sylvain Le Gall wrote:
On 04-05-2010, AUGER Cédriccedric.au...@lri.fr wrote:
type momentum = Moment of kinematic
That is does the constructor introduce an overhead or not?
As there is only one constructor, no overhead
On Tue, May 4, 2010 at 9:37 AM, Edgar Friendly thelema...@gmail.com wrote:
module M : sig
type momentum
val of_kin : kinematic - momentum
val to_kin : momentum - kinematic
end = struct
type momentum = kinematic
let of_kin x = x
let to_kin x = x
Goswin von Brederlow goswin-...@web.de:
This is not about optimized compiler in this case but about data
representation. Even if you use an optimized compiler (which is not
really the case with ocamlopt), you won't change datastructure
representation to optimize.
What do you mean? There is
rossb...@mpi-sws.org writes:
Goswin von Brederlow goswin-...@web.de:
This is not about optimized compiler in this case but about data
representation. Even if you use an optimized compiler (which is not
really the case with ocamlopt), you won't change datastructure
representation to
On 05/04/2010 07:53 AM, Sylvain Le Gall wrote:
On 04-05-2010, AUGER Cédriccedric.au...@lri.fr wrote:
type momentum = Moment of kinematic
That is does the constructor introduce an overhead or not?
As there is only one constructor, no overhead should be done in an
optimized compiler.
This is
On 04-05-2010, rossb...@mpi-sws.org rossb...@mpi-sws.org wrote:
Sylvain Le Gall sylv...@le-gall.net:
This is not about optimized compiler in this case but about data
representation. Even if you use an optimized compiler (which is not
really the case with ocamlopt), you won't change
ocamlopt does optimize data representation: for example, it can unbox
floats into registers, or into arrays of floats. However, there is a
tradeoff between such optimizations and efficiency: when you do too much
representation optimisation, you might end up performing a lot of tests
because a
On 01-05-2010, Dario Teixeira darioteixe...@yahoo.com wrote:
Hi,
type kinematic = { lin: Vec.t; ang: Vec.t }
Which I've been using to represent a medley of physical attributes (force,
momentum, velocity, etc.).
I second Stéphane's suggestion of using phantom types; moreover,
I