Why ArrayList is faster than Vector?

Showing Answers 1 - 11 of 11 Answers

Muruhanantham .C

  • Sep 26th, 2005
 

ArrayList is faster than Vector, because ArrayList is not synchronized. Synchronization will reduce the performance of Vector.

  Was this answer useful?  Yes

Devidas Sonawane

  • Oct 21st, 2005
 

Syncronisation Mechanism is more important in Vector class and b'caz of that speed of Vector reduces and Arraylist is not Syncronized and hence faster.

  Was this answer useful?  Yes

Vector is synchronized so JVM needs to take extra care to acquire and release locks to make vector thread safe. But ArrayList is not synchronized so JVM doesn't need this extra overhead.
That's why arraylist is faster than vector.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions