[concurrency-interest] RFR [8011215] optimization of CopyOnWriteArrayList.addIfAbsent()

Martin Buchholz martinrb at google.com
Tue Apr 2 17:17:25 EDT 2013

Have you benchmarked the case where the element is never present?
(with the usual caveats about micro-benchmarking - perhaps use google

On Tue, Apr 2, 2013 at 2:11 PM, Ivan Gerasimov <ivan.gerasimov at oracle.com>wrote:

> I've done a little testing on my side.
> I used Integer as an underlying type and set length of the array to the
> values from 1 to 100.
> My code shows a little performance gain - approximately 9%.
> I understand it may not be there for all cases, but at least for some
> cases it is there.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20130402/b172428a/attachment.html>

More information about the Concurrency-interest mailing list