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 KAA17888; Tue, 8 Jun 2004 10:11:14 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA17425 for ; Tue, 8 Jun 2004 10:11:13 +0200 (MET DST) Received: from petasus.isw.intel.com (petasus.isw.intel.com [192.55.37.196]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i588BBSH010819 for ; Tue, 8 Jun 2004 10:11:12 +0200 Received: from swsmsxvs01.isw.intel.com (swsmsxvs01.isw.intel.com [172.28.130.22]) by petasus.isw.intel.com (8.12.9-20030918-01/8.12.9/d: small-solo.mc,v 1.9 2004/01/09 01:01:53 root Exp $) with SMTP id i588ALQN020803; Tue, 8 Jun 2004 08:10:31 GMT Received: from swsmsx331.ger.corp.intel.com ([172.28.130.50]) by swsmsxvs01.isw.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004060809103006644 ; Tue, 08 Jun 2004 09:10:30 +0100 Received: from swsmsx402.ger.corp.intel.com ([172.28.130.26]) by swsmsx331.ger.corp.intel.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 8 Jun 2004 09:10:31 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: [Caml-list] 32 bit floats, SSE instructions Date: Tue, 8 Jun 2004 09:10:31 +0100 Message-ID: <78B55F0E8771CC4B8F6995AB83AF655204679C24@swsmsx402.ger.corp.intel.com> Thread-Topic: [Caml-list] 32 bit floats, SSE instructions Thread-Index: AcRM0DEy4piReBHtSYuitUQ8z0NCmgAXsPhQ From: "Ennals, Robert" To: "Nicolas Cannasse" , "Brandon J. Van Every" , "caml" X-OriginalArrivalTime: 08 Jun 2004 08:10:31.0363 (UTC) FILETIME=[1115D930:01C44D30] X-Miltered: at concorde with ID 40C5749F.000 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 pointers:01 datatype:01 pointers:01 floats:01 ints:01 ocaml:01 ocaml:01 garbage:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk [snip] > 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.=20 I assume you are referring to the way in which OCaml reserves one bit in each word to use as a tag that indicates whether the word represents a pointer or not (which is also the reason for ints being 31 bits). While a GC does need to have some way to distinguish between pointers and data, this is not the only way that this can be done. Another approach (used by GHC) is to dispense with tag bits and instead store a bitmask for each datatype and each stack layout, indicating which fields are pointers. I don't know much about the relative advantages/disadvantages of the two approaches, but there is definitely a design space to be explored, and it is definitely possible to have native 32 bit floats in a garbage collected language. [snip] -Rob ------------------- 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