On 05/28/2012 09:13 AM, Andrew Haley wrote:
On 05/26/2012 12:29 PM, Doug Lea wrote:
(Sometime this summer, I hope to write up something on
the various "little" coding issues that may be applicable
for improving performance of library code. As people
mentioned wrt the similar private accessor case,
most of these issues are not interesting/useful for
application code, but there's no reason not to address
them inside heavily used core libraries. The effects
are difficult to measure in any small set of tests using
these library components, so usually the best course of action
is to avoid known potential performance issues.)
The thing that bothers me about this is that such optimizations may be
rather VM-specific, sometimes to the extent of depending on how
HotSpot generates code for a particular case. Given that the OpenJDK
libraries are now used more widely, and hopefully this will increase,
what shall we do?
Andrew.
Usually it's more to avoid common pitfalls than trying to trigger a
specific VM optimization.
Rémi