From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA04650; Tue, 8 Jun 2004 16:23:28 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA04817 for ; Tue, 8 Jun 2004 16:23:27 +0200 (MET DST) Received: from mta1.cl.cam.ac.uk (mta1.cl.cam.ac.uk [128.232.0.15]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i58ENQEV023600 for ; Tue, 8 Jun 2004 16:23:26 +0200 Received: from astrocyte.cl.cam.ac.uk ([128.232.8.107] helo=cl.cam.ac.uk ident=[tw+ekLZ9WSoDsUF4tGXQTJx/lI8zs+yv]) by mta1.cl.cam.ac.uk with esmtp (Exim 3.092 #1) id 1BXhVa-0001z3-00; Tue, 08 Jun 2004 15:23:22 +0100 X-Mailer: exmh version 2.6.3-CL 04/04/2003 with nmh-1.0.4 X-Exmh-Isig-CompType: repl X-Exmh-Isig-Folder: cslists/caml To: "Nicolas Cannasse" cc: "Brandon J. Van Every" , "caml" Subject: Re: [Caml-list] 32 bit floats, SSE instructions In-reply-to: Your message of "Mon, 07 Jun 2004 22:39:47 +0200." <001c01c44ccf$964e4670$19b0e152@warp> Mime-Version: 1.0 Content-Type: text/plain Date: Tue, 08 Jun 2004 15:23:21 +0100 From: Keith Wansbrough Message-Id: X-Miltered: at nez-perce with ID 40C5CBDE.002 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 floats:01 boxing:01 runtime:01 unboxing:01 ocamlopt:01 high-level:01 floats:01 unboxing:01 haskell:01 high-level:01 cannasse:01 ocaml:01 ocaml:01 garbage:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > 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