Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] 32 bit floats, SSE instructions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Keith Wansbrough <Keith.Wansbrough@c...>
Subject: Re: [Caml-list] 32 bit floats, SSE instructions
> The main problem with float's - whatever if they are 32 or 64 bits - is
> their boxing . OCaml runtime value representation is efficient but a float -
> even 32 bits - cannot be carried in a register as it could be in C.
> (actually some unboxing can be performed locally by ocamlopt). This is
> mainly because OCaml is an high-level language, with a garbage collector,
> and so needs to keep the track of what is being allocated in an efficient
> way. Did you imagine having an higher level programming language for free ?

Oh, come on.  GHC has no problems with garbage-collecting floats in
the heap.  It also has no problems unboxing them, and does a
reasonable job (IIRC) of storing them in registers, just as in C.
Haskell has both Float (32 bit) and Double (64 bit).  Just because
OCaml doesn't handle them, doesn't mean no high-level programming
language can.

> Nicolas Cannasse

--KW 8-)

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