Locks vs Monitors
I wonder what your performance experiences are when using Locks or Monitors for synchronization.
I plan to synchronize some slightly contended (_most_ of the time uncontended) code, and well the choice is between Locks or traditional Monitors.
I've heard that Locks scale much better under contention, but I wonder wether this is still true with JDK6.
On the contrary some optimizations such as lock coarsening are only implemented for monitors. (Sadly biased locking doesn't work for me, because the object is alloaced in the first 4s after startup)
What I wonder is wether there is an upper limited for the method size of the synchronized methods.
What are your experiences with synchronization performance?