RFR [8011215] optimization of CopyOnWriteArrayList.addIfAbsent() (original) (raw)
Martin Buchholz martinrb at google.com
Tue Apr 2 21:17:25 UTC 2013
- Previous message: [concurrency-interest] RFR [8011215] optimization of CopyOnWriteArrayList.addIfAbsent()
- Next message: RFR [8011215] optimization of CopyOnWriteArrayList.addIfAbsent()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Previous message: [concurrency-interest] RFR [8011215] optimization of CopyOnWriteArrayList.addIfAbsent()
- Next message: RFR [8011215] optimization of CopyOnWriteArrayList.addIfAbsent()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]