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 WAA00200; Mon, 4 Jun 2001 22:04:42 +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 WAA00322 for ; Mon, 4 Jun 2001 22:04:41 +0200 (MET DST) Received: from mta5.snfc21.pbi.net (mta5.snfc21.pbi.net [206.13.28.241]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f54K4dX13522 for ; Mon, 4 Jun 2001 22:04:40 +0200 (MET DST) Received: from checkerlap.d6.com ([64.163.212.163]) by mta5.snfc21.pbi.net (Sun Internet Mail Server sims.3.5.2000.01.05.12.18.p9) with ESMTP id <0GEF00M7N91OCQ@mta5.snfc21.pbi.net> for caml-list@inria.fr; Mon, 4 Jun 2001 13:03:24 -0700 (PDT) Date: Mon, 04 Jun 2001 13:05:37 -0700 From: Chris Hecker Subject: Re: [Caml-list] OCaml Speed for Block Convolutions In-reply-to: <15131.59080.327155.47983@beertje.william.bogus> X-Sender: def6@shell16.ba.best.com To: William Chesters , caml-list@inria.fr Message-id: <4.3.2.7.2.20010604125946.02968c40@shell16.ba.best.com> MIME-version: 1.0 X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Content-type: text/plain; charset="us-ascii" References: <002f01c0ecf9$d028a3b0$210148bf@dylan> <002f01c0ecf9$d028a3b0$210148bf@dylan> Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > let a = ref 0. in >makes garbage---`a' isn't unboxed---while > type floatref = { mutable it: float } >doesn't. Does this bother anybody else besides me? Since ref is kind of built-in, is there any way to special case its use on unboxed types and optimize it without making us rewrite lots of code? There's plenty of other special cased stuff in the compiler, so hey, it's a party! :) The other place I get bitten by ref being kind of built-in, kind of not, is in pattern matching: match a_ref with { contents = 0.0 } -> yuck Yes, I can match !a, but that's not always convenient (for example, I want a function to take a ref, but name its value: let f ((x,y) as xy) z = fine let f ({contents = (x,y)} as xyr) z = a mess Maybe I'm still too imperative and use ref too much, but I run into this all the time. Chris ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr