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-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org

Reply via email to