Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 155D310328 for ; Mon, 4 Nov 2013 16:55:42 +0000 (UTC) Received: (qmail 85222 invoked by uid 500); 4 Nov 2013 16:55:40 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 84793 invoked by uid 500); 4 Nov 2013 16:55:39 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 84785 invoked by uid 99); 4 Nov 2013 16:55:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Nov 2013 16:55:39 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of sebbaz@gmail.com designates 74.125.82.48 as permitted sender) Received: from [74.125.82.48] (HELO mail-wg0-f48.google.com) (74.125.82.48) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Nov 2013 16:55:34 +0000 Received: by mail-wg0-f48.google.com with SMTP id b13so2350377wgh.27 for ; Mon, 04 Nov 2013 08:55:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=t1ZazRBX9F02vBNXHr6EHXC/UBCflN1APLucLq+b89c=; b=Ib3ciFI4xxAPGJAwDUugjl4rKm1/9yrpSIZXO6yCFGfSRc0uJhv7kRiL8LKQFk2oT7 J3zauH23RHO/FnTf+ItblxvbYmTxklHM2VBBPif7jATFANDMNz7ITnG2BJgOIS3cgK3c Gmo50lqMLAzj3oJ4yWTJF072LWts6BJKG8HRBVx9okWidSUxmEcFRmERljKwc6JMbWKe mErbbEkPGO6/vzbuKcYEPhKqrFK98h+mU942ZKMEXP73SMEIhrKGgrLWGEalO8EE50PG iTKS1tgvbgNXai7GMU2ZQJb9QEE1RRbp2FfNfnAX0nrMWyAsuyOf3TxgLhqN4ZB14awS Ic0g== MIME-Version: 1.0 X-Received: by 10.180.149.234 with SMTP id ud10mr13001751wib.25.1383584113138; Mon, 04 Nov 2013 08:55:13 -0800 (PST) Received: by 10.194.24.99 with HTTP; Mon, 4 Nov 2013 08:55:13 -0800 (PST) In-Reply-To: References: Date: Mon, 4 Nov 2013 16:55:13 +0000 Message-ID: Subject: Re: [MATH] Interest in large patches for small cleanup / performance changes? From: sebb To: Commons Developers List Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On 2 November 2013 14:52, Sean Owen wrote: > In Math, is there any appetite for large patches containing many > instances of particular micro-optimizations? Examples: > > - Replace: > a[i][j] =3D a[i][j] + foo; > with: > a[i][j] +=3D foo; > =85 which is faster/leaner in the byte code by a little bit. It might > make a difference in many nested, tight loops. Regardless of any speedup, it's safer not to repeat the value. a[i][j] =3D a[i][j] + foo; looks a lot like a[i][j] =3D a[i][i] + foo; or a[i][j] =3D a[j][i] + foo; at first glance, whereas a[i][j] +=3D foo; is unambiguous, and much clearer. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org