On 4/20/07, LvJimmy,Jing <[EMAIL PROTECTED]> 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.
