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


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

Re: Atomic integer array class question

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail
From Knute Johnson <nospam@knutejohnson.com>
Newsgroups comp.lang.java.programmer
Subject Re: Atomic integer array class question
Date Mon, 09 Jan 2012 07:45:32 -0800
Organization A noiseless patient Spider
Lines 18
Message-ID <jef22t$oc9$1@dont-email.me> (permalink)
References <9d7d89a6-3109-412f-a898-e2c9e82b780b@cs7g2000vbb.googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Mon, 9 Jan 2012 15:45:33 +0000 (UTC)
Injection-Info mx04.eternal-september.org; posting-host="mz/LDSJwiWnk3Jnnqg7x+Q"; logging-data="24969"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18AacS4IuX+E+e0KXKQSQDL"
User-Agent Mozilla/5.0 (Windows NT 5.1; rv:9.0) Gecko/20111222 Thunderbird/9.0.1
In-Reply-To <9d7d89a6-3109-412f-a898-e2c9e82b780b@cs7g2000vbb.googlegroups.com>
Cancel-Lock sha1:sg57z1oTJ46WJl0f7nLul8rV1IE=
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:11128

Show key headers only | 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