harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Kuksenko" <sergey.kukse...@gmail.com>
Subject Re: [classlib][performance] Harmony's great performance of ArrayList.add(int index, Object element)
Date Tue, 24 Apr 2007 09:42:43 GMT
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.





I suppose that it would be better to have a set of microbenchmarks which
cover all java.lang, java.util, etc classes.


Best regards,
---
Sergey Kuksenko.
Intel, Enterprise Solutions Software Division.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message