lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tatu Saloranta <cowtownco...@yahoo.com>
Subject Re: Vector
Date Sun, 07 May 2006 00:34:56 GMT
--- karl wettin <kalle@snigel.net> 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 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message