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 TAA17939; Tue, 5 Jun 2001 19:31:21 +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 TAA17964 for ; Tue, 5 Jun 2001 19:31:20 +0200 (MET DST) Received: from mta6.snfc21.pbi.net (mta6.snfc21.pbi.net [206.13.28.240]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f55HVJr12511 for ; Tue, 5 Jun 2001 19:31:19 +0200 (MET DST) Received: from checkerlap.d6.com ([64.163.212.163]) by mta6.snfc21.pbi.net (Sun Internet Mail Server sims.3.5.2000.01.05.12.18.p9) with ESMTP id <0GEG00M5FWNLEU@mta6.snfc21.pbi.net> for caml-list@inria.fr; Tue, 5 Jun 2001 10:30:58 -0700 (PDT) Date: Tue, 05 Jun 2001 00:22:03 -0700 From: Chris Hecker Subject: Re: [Caml-list] OCaml Speed for Block Convolutions In-reply-to: <002a01c0ed33$0b3d5de0$210148bf@dylan> X-Sender: def6@shell16.ba.best.com To: David McClain , caml-list@inria.fr Message-id: <4.3.2.7.2.20010605002003.027deaa0@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> <15131.59080.327155.47983@beertje.william.bogus> Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk >I think the constant creation of new arrays to hold intermediate results >(i.e., immutable data) is costing too much. Many of the intermediate values >could be overwritten in place and save a lot of time. >... of course... don't ask how long it took to write all this stuff in the >inner loops of the convolution in C, nor how long it took to debug that >stuff.... And immutable data definitely helps to get the code correct. OCaml >still rules! I think I'm missing something. The ocaml loops allocate memory for temps, but the C loops reuse storage? Did you do a version for ocaml that's got the same level of optimizations as the C version (not allocating, etc.)? If the code's not to big, could you post it? Chris ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr