harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Fursov" <mike.fur...@gmail.com>
Subject Re: [classlib][performance] Harmony's great performance of ArrayList.add(int index, Object element)
Date Fri, 20 Apr 2007 12:54:15 GMT
I hope we will combine client and server mode soon and our server
performance will be 'out of the box' performance as well as good startup
time with JET.

On 4/20/07, Andrew Zhang <zhanghuangzhu@gmail.com> wrote:
>
> On 4/20/07, Mikhail Fursov <mike.fursov@gmail.com> wrote:
> >
> > Did you try -Xem:server mode?
>
>
> With -Xem:server, it gets another 10% performance improvement. :)
>
> On 4/20/07, Leo Li <liyilei1979@gmail.com> wrote:
> > >
> > > Great!
> > >
> > > On 4/20/07, Alexey Varlamov <alexey.v.varlamov@gmail.com> wrote:
> > > >
> > > > Cool! On which VM did you measure?
> > > >
> > > > 2007/4/20, Alexey Petrenko <alexey.a.petrenko@gmail.com>:
> > > > > Nice to hear that :)
> > > > >
> > > > > SY, Alexey
> > > > >
> > > > > 2007/4/20, Andrew Zhang <zhanghuangzhu@gmail.com>:
> > > > > > Hey guys,
> > > > > >
> > > > > > I wrote a small performance benchmark for testing List.add(int
> > > index,
> > > > Object
> > > > > > element). Beyond my expectation, Harmony's ArrayList is
> amazingly
> > > fast
> > > > > > compared with RI. The test scenario is very simple:
> > > > > >
> > > > > > 1. fill a list with 100,000 elements
> > > > > >        for (int i = 0; i < LIST_COUNT; ++i) {
> > > > > >            list.add(element);
> > > > > >        }
> > > > > > 2. add another 100,000 elements into this list in the random
> index
> > > > from 0 -
> > > > > > 100,000.
> > > > > >       for (int i = 0; i < LIST_COUNT; ++i) {
> > > > > >            list.add(indexGenerator.nextInt(LIST_COUNT),element);
> > > > > >        }
> > > > > >
> > > > > > 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
> > > > > >
> > > > > > Very good work!
> > > > > >
> > > > > > --
> > > > > > Best regards,
> > > > > > Andrew Zhang
> > > > > >
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Leo Li
> > > China Software Development Lab, IBM
> > >
> >
> >
> >
> > --
> > Mikhail Fursov
> >
>
>
>
> --
> Best regards,
> Andrew Zhang
>



-- 
Mikhail Fursov

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message