Java – vector vs synchronizedlist performance

When reading the Oracle tutorial on collection implementation, I found the following sentences:

Source: List implementations

However, when searching for differences between them, many people do not encourage the use of vector and should replace it with synchronized list when synchronization is needed So which party has the right to be followed?

Solution

Of course, vector is an old API no problem.

But the speed may be just because synchronizing the list involves additional method calls to reach and return data, because it is, after all, the "wrapper" at the top of the list That's all it is, IMHO

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>