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 NAA27040; Tue, 8 Jun 2004 13:18:09 +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 NAA26759 for ; Tue, 8 Jun 2004 13:18:07 +0200 (MET DST) Received: from smtp3.adl2.internode.on.net (smtp3.adl2.internode.on.net [203.16.214.203]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i58BI4SH005564 for ; Tue, 8 Jun 2004 13:18:05 +0200 Received: from [192.168.1.200] (ppp114-11.lns1.syd3.internode.on.net [150.101.114.11]) by smtp3.adl2.internode.on.net (8.12.9/8.12.9) with ESMTP id i58BHmHY087548; Tue, 8 Jun 2004 20:47:49 +0930 (CST) Subject: RE: [Caml-list] 32 bit floats, SSE instructions From: skaller Reply-To: skaller@users.sourceforge.net To: "Ennals, Robert" Cc: Nicolas Cannasse , "Brandon J. Van Every" , caml-list In-Reply-To: <78B55F0E8771CC4B8F6995AB83AF655204679C24@swsmsx402.ger.corp.intel.com> References: <78B55F0E8771CC4B8F6995AB83AF655204679C24@swsmsx402.ger.corp.intel.com> Content-Type: text/plain Message-Id: <1086693467.16811.840.camel@pelican.wigram> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 08 Jun 2004 21:17:47 +1000 Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 40C5A06C.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 sourceforge:01 2004:99 pointers:01 datatype:01 pointers:01 floats:01 offsets:01 disadvantage:01 offsets:01 bloat:01 boxing:01 subsume:01 9660:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Tue, 2004-06-08 at 18:10, Ennals, Robert wrote: > [snip] > 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. Felix uses an array of offsets to locate pointers. And in Felix all types are fully expanded (except in sums due to a design stupidity in C++). A disadvantage of the offsets approach is that Felix pointers and C pointers can't be mixed in polymorphic functions operating on pointer to T: the distinction is entirely static. In Ocaml, the check is done at run time -- meaning less code bloat and a small performance hit. Expanded types provide superior efficiency in some cases, and of course include boxing (pointers) as a special case and so subsume systems that only box. -- John Skaller, mailto:skaller@users.sf.net voice: 061-2-9660-0850, snail: PO BOX 401 Glebe NSW 2037 Australia Checkout the Felix programming language http://felix.sf.net ------------------- 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