harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Varlamov" <alexey.v.varla...@gmail.com>
Subject Re: [classlib][performance] Harmony's great performance of ArrayList.add(int index, Object element)
Date Tue, 24 Apr 2007 10:57:24 GMT
2007/4/24, Sergey Kuksenko <sergey.kuksenko@gmail.com>:
> On 4/20/07, LvJimmy£¬Jing <firepure@gmail.com> wrote:
> >
> > > For step2, Harmony's ArrayList  50% - 100% faster than RI!
> > >
> > > Here's the result from my machine:
> > > 1st run:
> > > Harmony ArrayList insert1: elapsed = 10ms
> > > Harmony ArrayList insert2: elapsed = 14861ms
> > > Harmony Vector insert1: elapsed = 70ms
> > > Harmony Vector insert2: elapsed = 30333ms
> > >
> > > RI ArrayList insert1: elapsed = 110ms
> > > RI ArrayList insert2: elapsed = 29532ms
> > > RI Vector insert1: elapsed = 70ms
> > > RI Vector insert2: elapsed = 30384ms
> > >
> > > 2nd run:
> > > Harmony ArrayList insert1: elapsed = 20ms
> > > Harmony ArrayList insert2: elapsed = 14941ms
> > > Harmony Vector insert1: elapsed = 70ms
> > > Harmony Vector insert2: elapsed = 31345ms
> > >
> > > RI ArrayList insert1: elapsed = 70ms
> > > RI ArrayList insert2: elapsed = 31726ms
> > > RI Vector insert1: elapsed = 60ms
> > > RI Vector insert2: elapsed = 31095ms
> > >
> >
> > It seems in large mode, RI is a little better? So we may improve
> > Harmony memory management, GC , etc?
>
> Let's look more closely into results.
>
> We can see that Harmony's ArrayList is always faster.
>
> As to Vector, I wish to mention that RI is only 0.9% faster in large mode.
>
> The first, we can't say that RI is a little better, because first of all we
> should prove that default deviation of the microbenchmark is less then 0.9%.
> (It's easy to prove ¨C run it at least 10 times and collect statistics). I'd
> prefer to say that RI's Vector and Harmony's Vector have similar
> performance.
>
> The second ¨C If it is a real difference between Harmony and RI, I am almost
> sure that it is a synchronization impact.
>
> And the third - java.util.Vector was declared as obsolete since Java 2.

Sergey,
Could you please clarify the 3rd statement? I never seen it deprecated
or usage of it discouraged in official specifications.

>
> I suppose that it would be better to have a set of microbenchmarks which
> cover all java.lang, java.util, etc classes.
Would be very nice, indeed. Thanks for volunteering ;)

>
>
> Best regards,
> ---
> Sergey Kuksenko.
> Intel, Enterprise Solutions Software Division.
>
Mime
View raw message