ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Jackson <foamd...@gmail.com>
Subject Re: list iteration (was: svn commit: r1066963 ...)
Date Fri, 25 Feb 2011 09:00:09 GMT
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.  I suppose it depends
>> on where the hotspots are.
>
> And for a tool like Ant, it is unlikely that iterating a vector is consuming
> 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 some
> 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 would
> 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


Mime
View raw message