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 WAA22689; Tue, 23 Jul 2002 22:22:07 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id WAA22716 for caml-list@pauillac.inria.fr; Tue, 23 Jul 2002 22:22:07 +0200 (MET DST) 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 PAA14818 for ; Mon, 22 Jul 2002 15:27:21 +0200 (MET DST) Received: from abel (nat.umh.ac.be [193.190.193.1]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g6MDRKT12541 for ; Mon, 22 Jul 2002 15:27:20 +0200 (MET DST) Received: from abel ([127.0.0.1] helo=localhost ident=trch) by abel with esmtp (Exim 3.35 #1 (Debian)) id 17WdGa-0008HQ-00; Mon, 22 Jul 2002 15:30:24 +0200 Date: Mon, 22 Jul 2002 15:30:24 +0200 (CEST) Message-Id: <20020722.153024.113177885.Christophe.Troestler@umh.ac.be> To: oleg_inconnu@myrealbox.com Cc: caml-list@inria.fr Subject: Re: [Caml-list] Bigarray map & set/get From: Christophe TROESTLER In-Reply-To: <200207210044.UAA08888@dewberry.cc.columbia.edu> References: <20020719.155940.19123621.Christophe.Troestler@umh.ac.be> <200207210044.UAA08888@dewberry.cc.columbia.edu> Organization: Universite de Mons-Hainaut X-URL: http://www.umh.ac.be/math/an/ X-PGP-Fingerprint: CD33 D53D ED2B 6BE5 9018 6867 AD21 AA3F 9028 12D0 X-Spook: AIEWS Freeh AUTODIN Noriega BLU-97 A/B USDOJ Albright underground ANZUS BLU-114/B X-Mailer-URL: http://www.mew.org/ X-Operating-System: GNU/Linux (http://www.linux.org/) X-Blessing: Om Ah Hum Vajra Guru Pema Siddhi Hum X-Mailer: Mew version 2.2 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Thanks for your suggestions. Here are the results. On Sat, 20 Jul 2002, Oleg wrote: > > If you are using fortran layout (column-major) why are you > incrementing rows in the inner-most loop? (AFAICR this can make a > big difference with GCC, perhaps O'Caml too). Ooops! You are correct this make the times more reasonable (about 2 to 3 times C). > Also, each loop seems to contain a call to function Array2.dim2. > Can't this number be cached? Well, that in fact has the opposite effect of increasing very slightly the running time. > Thirdly, does bigarray access check bounds? Can this be turned off? It does. And I don't think it can be turned off. > And finally, you might try to experiment with 0-based indexing [1], > it may turn out to be faster. Very same running times. Cheers, ChriS ------------------- 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