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 UAA14942; Wed, 6 Jun 2001 20:22:05 +0200 (MET DST) 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 UAA14906 for ; Wed, 6 Jun 2001 20:22:04 +0200 (MET DST) Received: from smtp8.xs4all.nl (smtp8.xs4all.nl [194.109.127.134]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f56IM3L23707 for ; Wed, 6 Jun 2001 20:22:03 +0200 (MET DST) Received: from beertje.william.bogus (williamc.xs4all.nl [213.84.56.92]) by smtp8.xs4all.nl (8.9.3/8.9.3) with ESMTP id UAA12480; Wed, 6 Jun 2001 20:22:01 +0200 (CEST) Received: (from williamc@localhost) by beertje.william.bogus (8.11.2/8.11.2/SuSE Linux 8.11.1-0.5) id f56IPsL21163; Wed, 6 Jun 2001 20:25:54 +0200 X-Authentication-Warning: beertje.william.bogus: williamc set sender to williamc@paneris.org using -f From: William Chesters MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15134.30129.530882.423981@beertje.william.bogus> Date: Wed, 6 Jun 2001 20:25:53 +0200 (CEST) To: caml-list@inria.fr Subject: Re: [Caml-list] OCaml Speed for Block Convolutions In-Reply-To: <5.1.0.14.0.20010605205918.03b71790@chasm.org> References: <20010605104804.83767.qmail@web11902.mail.yahoo.com> <5.1.0.14.0.20010605205918.03b71790@chasm.org> X-Mailer: VM 6.75 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Charles Martin writes: > > >> > a := !a +. Array.unsafe_get xs i > >> a <- a +. Array.unsafe_get xs i > > At the risk of being off topic, I am wondering why most every code > scrap that appears on this list uses > [Array|String].unsafe_[get|set], rather than the "safe" versions. > Are off-by-one errors and the like so rare? Doesn't adding > "-unsafe" as a compiler option to your final build have the same > effect? If not, that would be worth knowing. it's just that when one posts performance-related snippets, it saves everyone's time if it's immediately clear that bounds checks are not an issue ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr