You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Tim Ellison <t....@gmail.com> on 2007/12/04 15:13:02 UTC

[classlib][luni] Problems merging TreeMap to Java 6 branch

I just took a look at merging the latest changes into the Java 6 branch,
and see that there is a collision in java.util.TreeMap and TreeSet.

We had two contributions,

HARMONY-4124  [classlib][luni][java6]TreeMap update to java 6

HARMONY-5232  [classlib][luni] TreeMap bug fixing and performance
improvements

which have introduced a discontinuity in the two implementations.

I'd like to ask Sergey and Jimmy if these can be reconciled -- I don't
think TreeMap changed so significantly between Java 5 and Java 6.  It
would be good to keep these in sync.

Regards,
Tim

Re: [classlib][luni] Problems merging TreeMap to Java 6 branch

Posted by Sergey Kuksenko <se...@gmail.com>.
I don't see any objection to make these implementation synchronized.
I can do consistent Java6 TreeMap implementatio till the end of December.
Is it ok?


On 12/4/07, Tim Ellison <t....@gmail.com> wrote:
>
> I just took a look at merging the latest changes into the Java 6 branch,
> and see that there is a collision in java.util.TreeMap and TreeSet.
>
> We had two contributions,
>
> HARMONY-4124  [classlib][luni][java6]TreeMap update to java 6
>
> HARMONY-5232  [classlib][luni] TreeMap bug fixing and performance
> improvements
>
> which have introduced a discontinuity in the two implementations.
>
> I'd like to ask Sergey and Jimmy if these can be reconciled -- I don't
> think TreeMap changed so significantly between Java 5 and Java 6.  It
> would be good to keep these in sync.
>
> Regards,
> Tim
>



-- 
Best regards,
---
Sergey Kuksenko.
Intel Enterprise Solutions Software Division.

Re: [classlib][luni] Problems merging TreeMap to Java 6 branch

Posted by "Jimmy,Jing Lv" <fi...@gmail.com>.
Hi,

2007/12/6, Sergey Kuksenko <se...@gmail.com>:
> I'd like to mention that HARMONY-5265 fixes all EUT on my runs.
> Let's wait official EUT checking.
>

I'm reading this, really great :)

> Also I'd like to share some performance measurements:
> HARMONY-5265 gives 4%-9% boost for SPECjbb2005. Different boosts depends on
> HW (different processors have different caches and memory sensitivity).
> Note: HARMONY-5232 gives only 2%-5% boost.

Very amazing improvement! Though I dont know how much will java6
TreeMap will gain from this(because of the complex structure), at
least, the new idea(downgrade treemap to sorted array) open a new way
to improve TreeMap and other similar collection utility classes.

> Also I have a bunch of numbers for different micro-benchmarks and I am
> planning to process and share them next week.
>
>
> On 12/5/07, Sergey Kuksenko <se...@gmail.com> wrote:
> >
> > FYI:
> > I've alredy fixed some regressions and I am working on all others.
> >
> >
> >  On 12/5/07, Tim Ellison <t....@gmail.com> wrote:
> > >
> > > Sergey Kuksenko wrote:
> > > > I will provide real performance numbers next week. Is it ok?
> > > > I want to do some short article about this performance improvement
> > > with
> > > > graphs and diagrams.
> > > > But right now, I wish to fix all bugs before code freeze.
> > > > I will reformat and remove printlns tomorrow.
> > > > As for merging Java6's and Java5's TreeMaps I hope we can do it after
> > > M4.
> > >
> > > Ok, then I'll let the two versions (Java 5 & 6 branches) diverge for the
> > > moment, with the intention that they will be merged again into a single
> > > version that represents the best aspects of the two we have got today,
> > > sometime after M4.
> > >
> > > Let us know when you have a fix for the Java 5 regression
> > > (HARMONY-5248).
> > >
> > > Regards,
> > > Tim
> > >
> > >
> >
> >
> > --
> > Best regards,
> > ---
> > Sergey Kuksenko.
> > Intel Enterprise Solutions Software Division.
> >
>
>
>
> --
> Best regards,
> ---
> Sergey Kuksenko.
> Intel Enterprise Solutions Software Division.
>


-- 

Best Regards!

Jimmy, Jing Lv
China Software Development Lab, IBM

Re: [classlib][luni] Problems merging TreeMap to Java 6 branch

Posted by "Jimmy,Jing Lv" <fi...@gmail.com>.
2007/12/6, Sergey Kuksenko <se...@gmail.com>:
> On 12/6/07, Tim Ellison <t....@gmail.com> wrote:
> >
> > > Also I'd like to share some performance measurements:
> > > HARMONY-5265 gives 4%-9% boost for SPECjbb2005.
> >
> > Here you are measuring the Java 5 impl before and after HARMONY-5265,
> > right?  Given that the Java 6 impl was improved by Jimmy it would be
> > interesting to see how those two compare -- just so we know which way to
> > merge the implementations.
>
>
> You are right. I measured Java5. implementation.
> I think we can (and should) complete Java5 - Java6 comparison and merging
> after M4.
>

Yes, I'm looking forward this - hope java6 may also improve 4%-9%! :)

> > Different boosts depends on
> > > HW (different processors have different caches and memory sensitivity).
> > > Note: HARMONY-5232 gives only 2%-5% boost.
> > > Also I have a bunch of numbers for different micro-benchmarks and I am
> > > planning to process and share them next week.
> >
> > Thanks,
> >
> > Tim
> >
>
>
>
> --
> Best regards,
> ---
> Sergey Kuksenko.
> Intel Enterprise Solutions Software Division.
>


-- 

Best Regards!

Jimmy, Jing Lv
China Software Development Lab, IBM

Re: [classlib][luni] Problems merging TreeMap to Java 6 branch

Posted by Sergey Kuksenko <se...@gmail.com>.
On 12/6/07, Tim Ellison <t....@gmail.com> wrote:
>
> > Also I'd like to share some performance measurements:
> > HARMONY-5265 gives 4%-9% boost for SPECjbb2005.
>
> Here you are measuring the Java 5 impl before and after HARMONY-5265,
> right?  Given that the Java 6 impl was improved by Jimmy it would be
> interesting to see how those two compare -- just so we know which way to
> merge the implementations.


You are right. I measured Java5. implementation.
I think we can (and should) complete Java5 - Java6 comparison and merging
after M4.

> Different boosts depends on
> > HW (different processors have different caches and memory sensitivity).
> > Note: HARMONY-5232 gives only 2%-5% boost.
> > Also I have a bunch of numbers for different micro-benchmarks and I am
> > planning to process and share them next week.
>
> Thanks,
>
> Tim
>



-- 
Best regards,
---
Sergey Kuksenko.
Intel Enterprise Solutions Software Division.

Re: [classlib][luni] Problems merging TreeMap to Java 6 branch

Posted by Tim Ellison <t....@gmail.com>.
Sergey Kuksenko wrote:
> I'd like to mention that HARMONY-5265 fixes all EUT on my runs.
> Let's wait official EUT checking.

ack

> Also I'd like to share some performance measurements:
> HARMONY-5265 gives 4%-9% boost for SPECjbb2005.

Here you are measuring the Java 5 impl before and after HARMONY-5265,
right?  Given that the Java 6 impl was improved by Jimmy it would be
interesting to see how those two compare -- just so we know which way to
merge the implementations.

> Different boosts depends on
> HW (different processors have different caches and memory sensitivity).
> Note: HARMONY-5232 gives only 2%-5% boost.
> Also I have a bunch of numbers for different micro-benchmarks and I am
> planning to process and share them next week.

Thanks,

Tim

Re: [classlib][luni] Problems merging TreeMap to Java 6 branch

Posted by Sergey Kuksenko <se...@gmail.com>.
I'd like to mention that HARMONY-5265 fixes all EUT on my runs.
Let's wait official EUT checking.

Also I'd like to share some performance measurements:
HARMONY-5265 gives 4%-9% boost for SPECjbb2005. Different boosts depends on
HW (different processors have different caches and memory sensitivity).
Note: HARMONY-5232 gives only 2%-5% boost.
Also I have a bunch of numbers for different micro-benchmarks and I am
planning to process and share them next week.


On 12/5/07, Sergey Kuksenko <se...@gmail.com> wrote:
>
> FYI:
> I've alredy fixed some regressions and I am working on all others.
>
>
>  On 12/5/07, Tim Ellison <t....@gmail.com> wrote:
> >
> > Sergey Kuksenko wrote:
> > > I will provide real performance numbers next week. Is it ok?
> > > I want to do some short article about this performance improvement
> > with
> > > graphs and diagrams.
> > > But right now, I wish to fix all bugs before code freeze.
> > > I will reformat and remove printlns tomorrow.
> > > As for merging Java6's and Java5's TreeMaps I hope we can do it after
> > M4.
> >
> > Ok, then I'll let the two versions (Java 5 & 6 branches) diverge for the
> > moment, with the intention that they will be merged again into a single
> > version that represents the best aspects of the two we have got today,
> > sometime after M4.
> >
> > Let us know when you have a fix for the Java 5 regression
> > (HARMONY-5248).
> >
> > Regards,
> > Tim
> >
> >
>
>
> --
> Best regards,
> ---
> Sergey Kuksenko.
> Intel Enterprise Solutions Software Division.
>



-- 
Best regards,
---
Sergey Kuksenko.
Intel Enterprise Solutions Software Division.

Re: [classlib][luni] Problems merging TreeMap to Java 6 branch

Posted by Sergey Kuksenko <se...@gmail.com>.
FYI:
I've alredy fixed some regressions and I am working on all others.


On 12/5/07, Tim Ellison <t....@gmail.com> wrote:
>
> Sergey Kuksenko wrote:
> > I will provide real performance numbers next week. Is it ok?
> > I want to do some short article about this performance improvement with
> > graphs and diagrams.
> > But right now, I wish to fix all bugs before code freeze.
> > I will reformat and remove printlns tomorrow.
> > As for merging Java6's and Java5's TreeMaps I hope we can do it after
> M4.
>
> Ok, then I'll let the two versions (Java 5 & 6 branches) diverge for the
> moment, with the intention that they will be merged again into a single
> version that represents the best aspects of the two we have got today,
> sometime after M4.
>
> Let us know when you have a fix for the Java 5 regression (HARMONY-5248).
>
> Regards,
> Tim
>
>


-- 
Best regards,
---
Sergey Kuksenko.
Intel Enterprise Solutions Software Division.

Re: [classlib][luni] Problems merging TreeMap to Java 6 branch

Posted by Tim Ellison <t....@gmail.com>.
Sergey Kuksenko wrote:
> I will provide real performance numbers next week. Is it ok?
> I want to do some short article about this performance improvement with
> graphs and diagrams.
> But right now, I wish to fix all bugs before code freeze.
> I will reformat and remove printlns tomorrow.
> As for merging Java6's and Java5's TreeMaps I hope we can do it after M4.

Ok, then I'll let the two versions (Java 5 & 6 branches) diverge for the
moment, with the intention that they will be merged again into a single
version that represents the best aspects of the two we have got today,
sometime after M4.

Let us know when you have a fix for the Java 5 regression (HARMONY-5248).

Regards,
Tim


Re: [classlib][luni] Problems merging TreeMap to Java 6 branch

Posted by Sergey Kuksenko <se...@gmail.com>.
Hi Jimmi,

I will provide real performance numbers next week. Is it ok?
I want to do some short article about this performance improvement with
graphs and diagrams.
But right now, I wish to fix all bugs before code freeze.
I will reformat and remove printlns tomorrow.
As for merging Java6's and Java5's TreeMaps I hope we can do it after M4.


On 12/4/07, Jimmy,Jing Lv <fi...@gmail.com> wrote:
>
> Hi,
>
>     I have just read the patch for 5232 (sorry I did not notice this
> last friday).  It was really cool that TreeMap can got a improment in
> performance (do you have some benchmark sorces on this, Sergey?) :)
>
>     And as I read the source code, I find the main change was some
> format problem, if I call an auto-format in eclipse and then compared
> with previous version (Oct 27th's version), over 60% difference
> disappeared! :) So format before commit is a good idea :) BTW, we may
> remove all "System.out.println" in our source code(find in method
> size()), do we?
>
>     and for improment mentioned on JIRA:
> 1. SubMap compared with upper bound key.
> I do notice this and IIRC, there's a improvement in version 6.  I'll
> take a further study which is better :)
> 2. SortedMap is downgraded to sorted array when in small size
> A really great idea! Sergey you must be a cpu-guru, are you? :)  It'll
> be better If we can get some solid benchmark score.
>
>     And for java6, TreeMap changes a lot in its lastest version, as a
> result, we did a lot change in java6 TreeMap, including its structure
> and inner classes. As I read the source code, I find it possible to
> merge them together but will require effect on it as it was really
> complex. Do we need to get it done before M4? If no, we can do the
> refactor little by little till  its complete.
>
>
> 2007/12/4, Tim Ellison <t....@gmail.com>:
> > I just took a look at merging the latest changes into the Java 6 branch,
> > and see that there is a collision in java.util.TreeMap and TreeSet.
> >
> > We had two contributions,
> >
> > HARMONY-4124  [classlib][luni][java6]TreeMap update to java 6
> >
> > HARMONY-5232  [classlib][luni] TreeMap bug fixing and performance
> > improvements
> >
> > which have introduced a discontinuity in the two implementations.
> >
> > I'd like to ask Sergey and Jimmy if these can be reconciled -- I don't
> > think TreeMap changed so significantly between Java 5 and Java 6.  It
> > would be good to keep these in sync.
> >
> > Regards,
> > Tim
> >
>
>
> --
>
> Best Regards!
>
> Jimmy, Jing Lv
> China Software Development Lab, IBM
>



-- 
Best regards,
---
Sergey Kuksenko.
Intel Enterprise Solutions Software Division.

Re: [classlib][luni] Problems merging TreeMap to Java 6 branch

Posted by "Jimmy,Jing Lv" <fi...@gmail.com>.
Hi,

     I have just read the patch for 5232 (sorry I did not notice this
last friday).  It was really cool that TreeMap can got a improment in
performance (do you have some benchmark sorces on this, Sergey?) :)

     And as I read the source code, I find the main change was some
format problem, if I call an auto-format in eclipse and then compared
with previous version (Oct 27th's version), over 60% difference
disappeared! :) So format before commit is a good idea :) BTW, we may
remove all "System.out.println" in our source code(find in method
size()), do we?

     and for improment mentioned on JIRA:
1. SubMap compared with upper bound key.
I do notice this and IIRC, there's a improvement in version 6.  I'll
take a further study which is better :)
2. SortedMap is downgraded to sorted array when in small size
A really great idea! Sergey you must be a cpu-guru, are you? :)  It'll
be better If we can get some solid benchmark score.

     And for java6, TreeMap changes a lot in its lastest version, as a
result, we did a lot change in java6 TreeMap, including its structure
and inner classes. As I read the source code, I find it possible to
merge them together but will require effect on it as it was really
complex. Do we need to get it done before M4? If no, we can do the
refactor little by little till  its complete.


2007/12/4, Tim Ellison <t....@gmail.com>:
> I just took a look at merging the latest changes into the Java 6 branch,
> and see that there is a collision in java.util.TreeMap and TreeSet.
>
> We had two contributions,
>
> HARMONY-4124  [classlib][luni][java6]TreeMap update to java 6
>
> HARMONY-5232  [classlib][luni] TreeMap bug fixing and performance
> improvements
>
> which have introduced a discontinuity in the two implementations.
>
> I'd like to ask Sergey and Jimmy if these can be reconciled -- I don't
> think TreeMap changed so significantly between Java 5 and Java 6.  It
> would be good to keep these in sync.
>
> Regards,
> Tim
>


-- 

Best Regards!

Jimmy, Jing Lv
China Software Development Lab, IBM