Aleksander,

I disagree with you on the term "not significant"
An increase by 27s I would see as serious.
And the percentage as a salary increase would also not be
seen as insignificant.

And I assume that your measurement was done in a single-threaded
environment.
The performance enhancements for synchronization in >1.4 are only
advertized for "uncontended" environments.

Everything which does not add benefit is overhead and has to be avoided.
If an instance of List is used local in a method why using then a
synchronized implementation?
There can't be a concurrency.

If the List is concurrently accessed then the method level synchronization
provided
by Vector is not useful in most of the cases.
In case of a scenario to iterate through the list to find a element to
process the
complete iteration loop has to be synchronized to avoid that two threads
will find
the same element. That the get methods are synchronized does not help.

A lot of other scenarios show also that the fine grain method
synchronization done by
Vector does not add real thread safeness.

I see Vector and Hashtable as wrong gone experiments
and put them into the cabinets next to T.Rex and others.

Best regards,
Heinz



----- Original Message -----
From: "Aleksander Slominski" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, February 16, 2003 1:32 PM
Subject: Re: ArrayList vs. Vector


> Elmar Fasel wrote:
>
> >looking at the source code I see that java.util.Vector is used in many
> >places.
> >
> >As java.util.ArrayList is considerably faster than Vector (e.g. see
> >these tests: http://verify.stanford.edu/uli/java_cpp.html), 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
> >version.
> >
> >
> 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 http://www.extreme.indiana.edu/~aslom/bnp/javaperf/
>
> 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).
>
> thanks,
>
> alek
>
> --
> "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
>
>

Reply via email to