axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aleksander Slominski <>
Subject Re: ArrayList vs. Vector
Date Sun, 16 Feb 2003 19:32:02 GMT
Elmar Fasel wrote:

>looking at the source code I see that java.util.Vector is used in many
>As java.util.ArrayList is considerably faster than Vector (e.g. see
>these tests:, I'm
>wondering, if I should try to rewrite the source to use ArrayList
>instead of Vector and do some performance tests against the Vector
hi Elmar,

this is not true any longer and the test you mentioned is quite old now 
(java results were not updated for over a year) - i have run and posted 
updated results at

here is relevant part (follow my URL for more details):

C:\Forge\homepage\bnp\javaperf>java Sort
sorting N=10000 REPEAT=10 ...
started at Sun Feb 16 13:28:48 EST 2003
finished at Sun Feb 16 13:30:31 EST 2003 in 102.858 sec

C:\Forge\homepage\bnp\javaperf>java SortVector
sorting N=10000 REPEAT=10 ...
started at Sun Feb 16 13:30:38 EST 2003
finished at Sun Feb 16 13:36:33 EST 2003 in 355.351 sec

C:\Forge\homepage\bnp\javaperf>java SortArrayList
sorting N=10000 REPEAT=10 ...
started at Sun Feb 16 13:37:08 EST 2003
finished at Sun Feb 16 13:42:37 EST 2003 in 328.362 sec

so as you can see the difference between Vector and ArrayList in modern 
JVMs is much less important than it used to be. there is also excellent 
book Java Performance Tuning now i think in 2nd Edition (i read 1st 
edition it was quite interesting).

anyway IMHO before doing any optimizations in AXIS i would first run 
some simple stress test (client - server) under profiler as i suspect 
that there are many much hotter and prone to optimizations spots in 
AXIS. if you plan to do that then make sure to run tests with different 
JAXP parsers as it was reported to make a very significant difference in 
overall performance (i would recommend trying to use piccolo).



"Mr. Pauli, we in the audience are all agreed that your theory is crazy. 
What divides us is whether it is crazy enough to be true." Niels H. D. Bohr

View raw message