You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by "Kevin A. Burton" <bu...@newsmonster.org> on 2004/02/20 04:20:34 UTC

Re: Vector -> LinkedList for performance reasons...

Doug Cutting wrote:

>
> My hunch is that the speedup will not be significant.  Synchronization 
> costs in modern JVMs are very small when there is no contention.  But 
> only measurement can say for sure.

The major problem is not just the synchronization but also the Vector 
array copy when when the internal object array is exhausted.  Looking at 
the code I expect that this happens often.

As soon as we release I plan on taking some time and playing with this...

....

Kevin

-- 

Please reply using PGP:

    http://peerfear.org/pubkey.asc    

    NewsMonster - http://www.newsmonster.org/
    
Kevin A. Burton, Location - San Francisco, CA, Cell - 415.595.9965
       AIM/YIM - sfburtonator,  Web - http://peerfear.org/
GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412
  IRC - freenode.net #infoanarchy | #p2p-hackers | #newsmonster


Re: Vector -> LinkedList for performance reasons...

Posted by Esmond Pitt <es...@motile.net>.
The internal array copy happens each time the array is grown, and by default
it is grown by doubling with an initial size of 10, so the array copy
happens log2(final size-10) times.

EJP

----- Original Message ----- 
From: "Kevin A. Burton" <bu...@newsmonster.org>
To: "Lucene Users List" <lu...@jakarta.apache.org>
Sent: Friday, February 20, 2004 2:20 PM
Subject: Re: Vector -> LinkedList for performance reasons...


> The major problem is not just the synchronization but also the Vector
> array copy when when the internal object array is exhausted.  Looking at
> the code I expect that this happens often.




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