lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tatu Saloranta <>
Subject Re: Vector
Date Sun, 07 May 2006 00:34:56 GMT
--- karl wettin <> wrote:
> Even Sun recommends Collection.synchronizedList over
> Vector when thread
> safty is an issue. 
> I belive that replaced with Linked- and ArrayLists
> it could save a whole
> bunch of ticks at heavy load.

Changing Vectors systematically to ArrayList would be
the most sensible thing to do. Except for huge Lists,
or with lots of changes to the middle, LinkedLists
have very little to offer (even iteration is likely to
be as fast or faster with ArrayList -- although I
haven't tested with micro-benchmark) over ArrayLists.
This because they add the Entry object overhead, for
memory use and access.

-+ Tatu +-

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message