Performance Difference of AtomicInteger vs Integer
问题 Is there any performance difference between AtomicInteger and Integer ? 回答1: The choice of these two types should not depend on the performance. The main choice for AtomicInteger is if you want to achieve thread safety with the operations on the integer. However the performace difference might strongly depend on the choosen operating system, as the detailed implementation of atomic operations depend on the operating system. 回答2: AtomicInteger allows some (not all!) operations that would