You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by "Jimmy,Jing Lv" <fi...@gmail.com> on 2008/08/26 12:31:12 UTC

[classlib][util]java6 TreeMap improvement

Hi All,

    As we discussed before, I plan to merge TreeMap performance
improvement into Harmony java6 level, which have many API enhancement,
and the structure of code refactors a lot due to the API changes.
Currently I am close to finish.
    Mainly Java6 TreeMap has a new interface "NavigableMap"  which
requires a lot more operations on TreeMap as ascending/descending the
map, define submaps and entries more precisely. That's the reason we
have many different inner classes for TreeMap. And in Harmony5 TreeMap
performance improvement,  the basic Node/Entry of the TreeMap is
changed so it requires a big change in the whole TreeMap class and its
variety of child classes.
    I've tried best to avoid performance downgrading with API changes
in java6. The main solution is that I try to keep simple operations as
it is in java5,  that is, if some methods are changed due to Java6
inner classes changes at the begining, I may try to keep a java5 inner
class and operate it. That's why the size of java6 TreeMap has
increased a bit.   However with some benchmark it shows the
performance was at least no worse than harmony java5 TreeMap. And I've
add a few more test cases to ensure the correctiveness of the
refactor, and also fix some bugs that remains in the original java6
TreeMap.

    I'll soon commit the fix.  I believe there's still a lot to be
improved here, e.g, reduce the class size, refactor/merge some inner
classes, and improve some methods that are not optimized yet.


------------
Best Regards!

Jimmy, Jing Lv
China Software Development Lab, IBM

Re: [classlib][util]java6 TreeMap improvement

Posted by Sean Qiu <se...@gmail.com>.
I have created the JIRA-5935 to all merging work.
You can comment there.
I think you can create a separate jira for TreeMap.

2008/8/27 Jimmy,Jing Lv <fi...@gmail.com>:
> Hi,
>
>    Thanks Sean, I've noticed that and fixed them in the change
> already. And is there a jira for these failure?
>
> 2008/8/27 Sean Qiu <se...@gmail.com>:
>> Great, Jimmy.
>>
>> I have not merge the updates from trunk5 for TreeMap since you said
>> you will do it separately for it.
>> Could you please pay your attention to these tests as well?
>> They are supposed to pass after your updates.
>>
>> TreeMapTest                             test_entrySet_contains
>> TreeMapRndTest                      testValues
>> TreeMapRndTest                      testViews
>>
>> Thank you for your job.
>>
>> 2008/8/26 Jimmy,Jing Lv <fi...@gmail.com>:
>>> Hi All,
>>>
>>>    As we discussed before, I plan to merge TreeMap performance
>>> improvement into Harmony java6 level, which have many API enhancement,
>>> and the structure of code refactors a lot due to the API changes.
>>> Currently I am close to finish.
>>>    Mainly Java6 TreeMap has a new interface "NavigableMap"  which
>>> requires a lot more operations on TreeMap as ascending/descending the
>>> map, define submaps and entries more precisely. That's the reason we
>>> have many different inner classes for TreeMap. And in Harmony5 TreeMap
>>> performance improvement,  the basic Node/Entry of the TreeMap is
>>> changed so it requires a big change in the whole TreeMap class and its
>>> variety of child classes.
>>>    I've tried best to avoid performance downgrading with API changes
>>> in java6. The main solution is that I try to keep simple operations as
>>> it is in java5,  that is, if some methods are changed due to Java6
>>> inner classes changes at the begining, I may try to keep a java5 inner
>>> class and operate it. That's why the size of java6 TreeMap has
>>> increased a bit.   However with some benchmark it shows the
>>> performance was at least no worse than harmony java5 TreeMap. And I've
>>> add a few more test cases to ensure the correctiveness of the
>>> refactor, and also fix some bugs that remains in the original java6
>>> TreeMap.
>>>
>>>    I'll soon commit the fix.  I believe there's still a lot to be
>>> improved here, e.g, reduce the class size, refactor/merge some inner
>>> classes, and improve some methods that are not optimized yet.
>>>
>>>
>>> ------------
>>> Best Regards!
>>>
>>> Jimmy, Jing Lv
>>> China Software Development Lab, IBM
>>>
>>
>>
>>
>> --
>> Best Regards
>> Sean, Xiao Xia Qiu
>>
>> China Software Development Lab, IBM
>>
>
>
>
> --
>
> Best Regards!
>
> Jimmy, Jing Lv
> China Software Development Lab, IBM
>



-- 
Best Regards
Sean, Xiao Xia Qiu

China Software Development Lab, IBM

Re: [classlib][util]java6 TreeMap improvement

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

    Thanks Sean, I've noticed that and fixed them in the change
already. And is there a jira for these failure?

2008/8/27 Sean Qiu <se...@gmail.com>:
> Great, Jimmy.
>
> I have not merge the updates from trunk5 for TreeMap since you said
> you will do it separately for it.
> Could you please pay your attention to these tests as well?
> They are supposed to pass after your updates.
>
> TreeMapTest                             test_entrySet_contains
> TreeMapRndTest                      testValues
> TreeMapRndTest                      testViews
>
> Thank you for your job.
>
> 2008/8/26 Jimmy,Jing Lv <fi...@gmail.com>:
>> Hi All,
>>
>>    As we discussed before, I plan to merge TreeMap performance
>> improvement into Harmony java6 level, which have many API enhancement,
>> and the structure of code refactors a lot due to the API changes.
>> Currently I am close to finish.
>>    Mainly Java6 TreeMap has a new interface "NavigableMap"  which
>> requires a lot more operations on TreeMap as ascending/descending the
>> map, define submaps and entries more precisely. That's the reason we
>> have many different inner classes for TreeMap. And in Harmony5 TreeMap
>> performance improvement,  the basic Node/Entry of the TreeMap is
>> changed so it requires a big change in the whole TreeMap class and its
>> variety of child classes.
>>    I've tried best to avoid performance downgrading with API changes
>> in java6. The main solution is that I try to keep simple operations as
>> it is in java5,  that is, if some methods are changed due to Java6
>> inner classes changes at the begining, I may try to keep a java5 inner
>> class and operate it. That's why the size of java6 TreeMap has
>> increased a bit.   However with some benchmark it shows the
>> performance was at least no worse than harmony java5 TreeMap. And I've
>> add a few more test cases to ensure the correctiveness of the
>> refactor, and also fix some bugs that remains in the original java6
>> TreeMap.
>>
>>    I'll soon commit the fix.  I believe there's still a lot to be
>> improved here, e.g, reduce the class size, refactor/merge some inner
>> classes, and improve some methods that are not optimized yet.
>>
>>
>> ------------
>> Best Regards!
>>
>> Jimmy, Jing Lv
>> China Software Development Lab, IBM
>>
>
>
>
> --
> Best Regards
> Sean, Xiao Xia Qiu
>
> China Software Development Lab, IBM
>



-- 

Best Regards!

Jimmy, Jing Lv
China Software Development Lab, IBM

Re: [classlib][util]java6 TreeMap improvement

Posted by Sean Qiu <se...@gmail.com>.
Great, Jimmy.

I have not merge the updates from trunk5 for TreeMap since you said
you will do it separately for it.
Could you please pay your attention to these tests as well?
They are supposed to pass after your updates.

TreeMapTest                             test_entrySet_contains
TreeMapRndTest                      testValues
TreeMapRndTest                      testViews

Thank you for your job.

2008/8/26 Jimmy,Jing Lv <fi...@gmail.com>:
> Hi All,
>
>    As we discussed before, I plan to merge TreeMap performance
> improvement into Harmony java6 level, which have many API enhancement,
> and the structure of code refactors a lot due to the API changes.
> Currently I am close to finish.
>    Mainly Java6 TreeMap has a new interface "NavigableMap"  which
> requires a lot more operations on TreeMap as ascending/descending the
> map, define submaps and entries more precisely. That's the reason we
> have many different inner classes for TreeMap. And in Harmony5 TreeMap
> performance improvement,  the basic Node/Entry of the TreeMap is
> changed so it requires a big change in the whole TreeMap class and its
> variety of child classes.
>    I've tried best to avoid performance downgrading with API changes
> in java6. The main solution is that I try to keep simple operations as
> it is in java5,  that is, if some methods are changed due to Java6
> inner classes changes at the begining, I may try to keep a java5 inner
> class and operate it. That's why the size of java6 TreeMap has
> increased a bit.   However with some benchmark it shows the
> performance was at least no worse than harmony java5 TreeMap. And I've
> add a few more test cases to ensure the correctiveness of the
> refactor, and also fix some bugs that remains in the original java6
> TreeMap.
>
>    I'll soon commit the fix.  I believe there's still a lot to be
> improved here, e.g, reduce the class size, refactor/merge some inner
> classes, and improve some methods that are not optimized yet.
>
>
> ------------
> Best Regards!
>
> Jimmy, Jing Lv
> China Software Development Lab, IBM
>



-- 
Best Regards
Sean, Xiao Xia Qiu

China Software Development Lab, IBM

Re: [classlib][util]java6 TreeMap improvement

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

     Sounds reasonable, thanks a lot and welcome Regis! :)
     And please check https://issues.apache.org/jira/browse/HARMONY-5959

2008/8/26 Regis <xu...@gmail.com>:
> Hi Jimmy,
>
> That's great! But what I'm thinking is if we should create a JIRA to track
> this merge. As you
> said, there are lots of work, include bugs fixing, refactors, adding tests,
> it's better to be
> tracked by JIRA, so we can see all the progress. And I'm volunteer to join
> Jimmy, if there
> are anything I can do.
>
> Best Regards,
> Regis.
>
> Jimmy,Jing Lv wrote:
>>
>> Hi All,
>>
>>    As we discussed before, I plan to merge TreeMap performance
>> improvement into Harmony java6 level, which have many API enhancement,
>> and the structure of code refactors a lot due to the API changes.
>> Currently I am close to finish.
>>    Mainly Java6 TreeMap has a new interface "NavigableMap"  which
>> requires a lot more operations on TreeMap as ascending/descending the
>> map, define submaps and entries more precisely. That's the reason we
>> have many different inner classes for TreeMap. And in Harmony5 TreeMap
>> performance improvement,  the basic Node/Entry of the TreeMap is
>> changed so it requires a big change in the whole TreeMap class and its
>> variety of child classes.
>>    I've tried best to avoid performance downgrading with API changes
>> in java6. The main solution is that I try to keep simple operations as
>> it is in java5,  that is, if some methods are changed due to Java6
>> inner classes changes at the begining, I may try to keep a java5 inner
>> class and operate it. That's why the size of java6 TreeMap has
>> increased a bit.   However with some benchmark it shows the
>> performance was at least no worse than harmony java5 TreeMap. And I've
>> add a few more test cases to ensure the correctiveness of the
>> refactor, and also fix some bugs that remains in the original java6
>> TreeMap.
>>
>>    I'll soon commit the fix.  I believe there's still a lot to be
>> improved here, e.g, reduce the class size, refactor/merge some inner
>> classes, and improve some methods that are not optimized yet.
>>
>>
>> ------------
>> Best Regards!
>>
>> Jimmy, Jing Lv
>> China Software Development Lab, IBM
>>
>



-- 

Best Regards!

Jimmy, Jing Lv
China Software Development Lab, IBM

Re: [classlib][util]java6 TreeMap improvement

Posted by Regis <xu...@gmail.com>.
Hi Jimmy,

That's great! But what I'm thinking is if we should create a JIRA to 
track this merge. As you
said, there are lots of work, include bugs fixing, refactors, adding 
tests, it's better to be
tracked by JIRA, so we can see all the progress. And I'm volunteer to 
join Jimmy, if there
are anything I can do.

Best Regards,
Regis.

Jimmy,Jing Lv wrote:
> Hi All,
> 
>     As we discussed before, I plan to merge TreeMap performance
> improvement into Harmony java6 level, which have many API enhancement,
> and the structure of code refactors a lot due to the API changes.
> Currently I am close to finish.
>     Mainly Java6 TreeMap has a new interface "NavigableMap"  which
> requires a lot more operations on TreeMap as ascending/descending the
> map, define submaps and entries more precisely. That's the reason we
> have many different inner classes for TreeMap. And in Harmony5 TreeMap
> performance improvement,  the basic Node/Entry of the TreeMap is
> changed so it requires a big change in the whole TreeMap class and its
> variety of child classes.
>     I've tried best to avoid performance downgrading with API changes
> in java6. The main solution is that I try to keep simple operations as
> it is in java5,  that is, if some methods are changed due to Java6
> inner classes changes at the begining, I may try to keep a java5 inner
> class and operate it. That's why the size of java6 TreeMap has
> increased a bit.   However with some benchmark it shows the
> performance was at least no worse than harmony java5 TreeMap. And I've
> add a few more test cases to ensure the correctiveness of the
> refactor, and also fix some bugs that remains in the original java6
> TreeMap.
> 
>     I'll soon commit the fix.  I believe there's still a lot to be
> improved here, e.g, reduce the class size, refactor/merge some inner
> classes, and improve some methods that are not optimized yet.
> 
> 
> ------------
> Best Regards!
> 
> Jimmy, Jing Lv
> China Software Development Lab, IBM
>