"david.lloyd@jboss.com" wrote:
As far as using a concurrent queue - perhaps you could squeeze out a tiny bit more performance, but unless it shows up as a blip on a profiler, I'm not going to bother because frankly I doubt that there will be significant (unwanted) contention for the lock. (Remember that the purpose is to serialize access, after all)
MINA also uses ConcurrentLinkedQueue a lot internally. I tried a synchronized circular queue, which is similar to ArrayDequeue, but the performance difference was negligible.
Seeing sun.misc.Unsafe or compareAndSwap() in your profiler as a hot spot might mean there's not much room left for performance improvement, unless any innovative redesign exists. Our mileage might vary though. :)
"trustin" wrote:
MINA also uses ConcurrentLinkedQueue a lot internally. I tried a synchronized circular queue, which is similar to ArrayDequeue, but the performance difference was negligible