I am carrying out an experiment with two multithreading java programs. I have one that is not synchronized and another that is using AtomicInteger
. The AtomicInteger
is much slower. I think this might be because of the method AtomicInteger
uses compareAndset()
. Am I correct?
Is using AtomicInteger in a java multithreading program slower and inefficient than other methods of synchronization?
↧
↧
Trending Articles
More Pages to Explore .....