-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chuck,

On 5/12/2009 12:27 AM, Caldarale, Charles R wrote:
>> From: David Kerber [mailto:dcker...@verizon.net]
>> Subject: Re: Performance with many small requests
>>
>> Incrementing a counter can't be much of a synchronization bottleneck,
>> and if I switch to an AtomicInteger, it should be even less of one.
> 
> Actually, it won't. There's a slight performance difference between
> the two mechanisms, but it's usually in favor of the synchronized
> increment, not the AtomicInteger, at least on my dual-core AMD 64 system
> running JDK 6u12 in 64-bit server mode on Vista. The difference is only
> a few percent, so you should just code it whichever way you find more
> maintainable. (Test program available on request; it would be
> interesting to see if the same relationship exists on a modern Intel chip.)

High monitor contention or low? I can run your test code on a Core 2 Duo
if you want to publish it.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkoJnmYACgkQ9CaO5/Lv0PDvxgCgsJr3YwJRFNh4ibZEQacaIWcN
1QcAnA5rOrqpu3WMqiBhzUZ6si3bI0lX
=9sJl
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to