Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #11128

Re: Atomic integer array class question

From Knute Johnson <nospam@knutejohnson.com>
Newsgroups comp.lang.java.programmer
Subject Re: Atomic integer array class question
Date 2012-01-09 07:45 -0800
Organization A noiseless patient Spider
Message-ID <jef22t$oc9$1@dont-email.me> (permalink)
References <9d7d89a6-3109-412f-a898-e2c9e82b780b@cs7g2000vbb.googlegroups.com>

Show all headers | View raw


On 1/9/2012 7:10 AM, raphfrk@gmail.com wrote:
> Does the atomic integer array class treat each individual element in
> the array separately?
>
> Would an array of size 10 have the same performance as an array of
> AtomicIntegers of size 10, in terms of accesses to one element
> affecting accesses to another element?

Read the package description for java.util.concurrent.atomic to get a 
good idea of what the Atomic variables are.  But no the performance will 
not be as good as a regular array.

Why don't you post something about what you are really going to do with 
the array and maybe somebody can give you a better idea of what way to go.

-- 

Knute Johnson

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Atomic integer array class question "raphfrk@gmail.com" <raphfrk@gmail.com> - 2012-01-09 07:10 -0800
  Re: Atomic integer array class question Knute Johnson <nospam@knutejohnson.com> - 2012-01-09 07:45 -0800
    Re: Atomic integer array class question "raphfrk@gmail.com" <raphfrk@gmail.com> - 2012-01-09 08:17 -0800
      Re: Atomic integer array class question Patricia Shanahan <pats@acm.org> - 2012-01-09 10:56 -0800
        Re: Atomic integer array class question "raphfrk@gmail.com" <raphfrk@gmail.com> - 2012-01-10 06:22 -0800
          Re: Atomic integer array class question Roedy Green <see_website@mindprod.com.invalid> - 2012-01-10 06:52 -0800
          Re: Atomic integer array class question Lew <noone@lewscanon.com> - 2012-01-10 07:17 -0800
          Re: Atomic integer array class question Patricia Shanahan <pats@acm.org> - 2012-01-10 07:43 -0800
          Re: Atomic integer array class question markspace <-@.> - 2012-01-10 08:37 -0800

csiph-web