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 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: 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 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