Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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-08 (14:23)
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 Archives:
Bug reports: FAQ:
Beginner's list: