Re: Which is best Vector or ArrayList? I have seen many posts warning people to staty away from Vector and use ArrayList since ArrayList is "much faster".
I have done time tests (using 1.3) and found no real difference. On occasion, Vector was even faster. If you look at its implementation, Vector is backed by an array which makes access quick.
Since Vector is what is also used by older existing classes and it is also a List, I think that Vector is a better choice.
Does anyone have any specific evidence that ArrayList is so much better than Vector? |