From dev-return-86360-apmail-ant-dev-archive=ant.apache.org@ant.apache.org Fri Feb 25 09:01:53 2011 Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 13210 invoked from network); 25 Feb 2011 09:01:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Feb 2011 09:01:52 -0000 Received: (qmail 87650 invoked by uid 500); 25 Feb 2011 09:01:52 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 87520 invoked by uid 500); 25 Feb 2011 09:01:49 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 87512 invoked by uid 99); 25 Feb 2011 09:01:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Feb 2011 09:01:48 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of foamdino@gmail.com designates 209.85.212.45 as permitted sender) Received: from [209.85.212.45] (HELO mail-vw0-f45.google.com) (209.85.212.45) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Feb 2011 09:01:42 +0000 Received: by vws19 with SMTP id 19so1321553vws.4 for ; Fri, 25 Feb 2011 01:01:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=pWq/96AFKfT2G0+Vfrs8eSGQO4VCtcUP5/fr+hAYbBw=; b=KU9EHEVglsemRKzbt3wanIOvhuMZ7TkSPpJ0oFROtqkvhW4WvGas+s+r/wejBhGN/8 J27A3P1IK2SMmLAv/5CySUfC1heTMhKfxVUFKx1c2zk5YVEzbDlUteWhNz+iRSguM9Nt HBHE4sxx5qmGKmc+DRHbizNQTnyNoLc/97EEI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=Hw9DyAGIKcwCKHa6dYsFAsUfXStQaAp7fnqSkI/2IaqJlcO5NxkHumFvxfnJO1Y+hC OGDhd3RBVxfCXOHC/IQkq70rquKh1hx4UuJzAZn3ppNkJ5oNIuYxZ8x4bWwwavNTRd9R 8iDiPF6zTtMgCXE2CTrj8E1hlvOWGaNw5iguw= MIME-Version: 1.0 Received: by 10.52.166.138 with SMTP id zg10mr49523vdb.204.1298624409280; Fri, 25 Feb 2011 01:00:09 -0800 (PST) Received: by 10.220.203.137 with HTTP; Fri, 25 Feb 2011 01:00:09 -0800 (PST) In-Reply-To: References: Date: Fri, 25 Feb 2011 16:00:09 +0700 Message-ID: Subject: Re: list iteration (was: svn commit: r1066963 ...) From: Kevin Jackson To: Ant Developers List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi, >> I tried to introduce some micro-optimizations >> (pretty much like these) into the Tomcat codebase 8 years ago, but was >> met with 'meh why bother?' responses as the thinking was that the vm >> would pretty much make optimizations pointless. =A0I suppose it depends >> on where the hotspots are. > > And for a tool like Ant, it is unlikely that iterating a vector is consum= ing > any measurable proportion of execution time, unless for some reason this > particular vector is enormous or you are scanning it many thousands of > times. Most of the time will be spent waiting for disk I/O, or CPU in som= e > tool like javac. If you actually run a profiler on some typical loads and > ignore unavoidable overhead (such as logically necessary file stats), > usually you find some weird and vaguely embarrassing problem that you wou= ld > never have guessed otherwise. Oh yes - agreed, no 'point' in optimising code which isn't actually bogging the system down. In my defence, I suggested these changes when I was inexperienced - still it was my time to waste (the advantage of open source software). If I was messing with this stuff while being paid to properly optimise some code I should have been shot! :) Measure first has been drummed into me now :) Kev --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org