[concurrency-interest] ThreadPoolExecutor implement question!

David Holmes dcholmes at optusnet.com.au
Thu Sep 21 08:12:37 EDT 2006

Doug writes:
> This is a micro-optimization that matters less as JVMs get smarter,
> and even so, is hardly ever worth doing (which is why we don't
> talk about it much) unless you are writing library code used
> by millions of people where you might as well make it as fast
> as you know how.

For completeness I'll mention that "caching" fields into locals can have
performance benefits in specialized contexts, such as in real-time Java. In
the RTSJ field accesses can require additional checks on both reads and
writes, so reducing that to a single read/write can be beneficial. The
optimizations in such environments are still lagging.


More information about the Concurrency-interest mailing list