English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 2004-06-10 (14:44)
From: David Brown <caml-list@d...>
Subject: Re: [Caml-list] 32 bit floats, SSE instructions
On Tue, Jun 08, 2004 at 03:23:21PM +0100, Keith Wansbrough wrote:

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

GHC's execution model is also slower than ocaml's, and I'm not just
referring to the lazy evaluation aspect.  31-bit tagged integers in
ocaml is a great tradeoff for many applications.  It allows the GC to be
exact, but the compiler doesn't need to explicitly register all
variables at every stack frame.  Unfortunately, it forces 32-bit
quantities to be boxed.

GHC is also much easier to bind with C, both because of how FFI is done,
and that 32-bit values are actually 32-bit values.

BTW, GHC boxes almost everything, and leaves selective unboxing to the


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