RFR [8011215] optimization of CopyOnWriteArrayList.addIfAbsent()
Martin Buchholz
martinrb at google.com
Tue Apr 2 21:17:25 UTC 2013
Have you benchmarked the case where the element is never present?
(with the usual caveats about micro-benchmarking - perhaps use google
caliper?)
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.
>
>
More information about the core-libs-dev
mailing list