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 SAA19410; Wed, 9 Jun 2004 18:14:21 +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 SAA19022 for ; Wed, 9 Jun 2004 18:14:20 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i59GDjEV024102; Wed, 9 Jun 2004 18:13:45 +0200 Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA19326; Wed, 9 Jun 2004 18:13:44 +0200 (MET DST) Date: Wed, 9 Jun 2004 18:13:44 +0200 From: Xavier Leroy To: "Ennals, Robert" Cc: Nicolas Cannasse , "Brandon J. Van Every" , caml Subject: Re: [Caml-list] 32 bit floats, SSE instructions Message-ID: <20040609181344.C17538@pauillac.inria.fr> References: <78B55F0E8771CC4B8F6995AB83AF655204679C24@swsmsx402.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <78B55F0E8771CC4B8F6995AB83AF655204679C24@swsmsx402.ger.corp.intel.com>; from robert.ennals@intel.com on Tue, Jun 08, 2004 at 09:10:31AM +0100 X-Miltered: at nez-perce with ID 40C73739.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 pointers:01 datatype:01 pointers:01 ocamlopt:01 gallium:01 morphed:01 ocamlopt:01 slower:01 floats:01 compiler:01 distinguish:01 stack:02 stack:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > 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. ocamlopt does that for stack frames, but not for heap-allocated blocks. I used the approach you describe (heap blocks containing mixtures of pointers and raw data) in the Gallium experimental compiler (which later morphed into ocamlopt), but it makes GC significantly slower, which is a pity given that this feature is rarely used: especially in symbolic computation, where GC times are critical, most data structures are "pointers only" or "raw bits only". Heap-allocating 3- or 4-vectors or 3x3- or 4x4 matrixes of floats is quite reasonable, however, and probably what the OP really wants although he denies it vehemently :-) - Xavier Leroy ------------------- 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