You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Jim Yu (JIRA)" <ji...@apache.org> on 2009/01/09 08:30:59 UTC

[jira] Created: (HARMONY-6070) [luni] Improve Long.toString(long) performance

[luni] Improve Long.toString(long) performance
----------------------------------------------

                 Key: HARMONY-6070
                 URL: https://issues.apache.org/jira/browse/HARMONY-6070
             Project: Harmony
          Issue Type: Improvement
          Components: Classlib
    Affects Versions: 5.0M8
            Reporter: Jim Yu
             Fix For: 5.0M9


Based on the algorithm for HARMONY-6068, I've made a patch for Long.toString(long). Since the big long numbers can have much more digits than integers, this algorithm can improve the performance a lot for big long numbers.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-6070) [luni] Improve Long.toString(long) performance

Posted by "Jim Yu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-6070?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jim Yu updated HARMONY-6070:
----------------------------

    Attachment: HARMONY-6070.diff

> [luni] Improve Long.toString(long) performance
> ----------------------------------------------
>
>                 Key: HARMONY-6070
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6070
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>    Affects Versions: 5.0M8
>            Reporter: Jim Yu
>             Fix For: 5.0M9
>
>         Attachments: HARMONY-6070.diff
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Based on the algorithm for HARMONY-6068, I've made a patch for Long.toString(long). Since the big long numbers can have much more digits than integers, this algorithm can improve the performance a lot for big long numbers.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-6070) [luni] Improve Long.toString(long) performance

Posted by "Jim Yu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-6070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12662296#action_12662296 ] 

Jim Yu commented on HARMONY-6070:
---------------------------------

Aleksey, I've considered the duplication problem but have some concerns for creating an internal Conversion utility. Though the algorithm is the same for both Long and Integer, there are some specific differences for each of them. E.g. We need to allocate different sizes of buffer for each of them, the type of some local variables such as positive_value is different( long for Long class and int for Integer class, since using long type for Integer will result in performance degradation),  the static numbers array for Long and Integer are different, the MIN_VALUE is different and so on. We may solve these problems by specify a parameter to identify it is a Long or Integer, but it will make the internal class look like just put two methods together. Hopefully, my concern is not a big problem.

> [luni] Improve Long.toString(long) performance
> ----------------------------------------------
>
>                 Key: HARMONY-6070
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6070
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>    Affects Versions: 5.0M8
>            Reporter: Jim Yu
>             Fix For: 5.0M9
>
>         Attachments: HARMONY-6070.diff
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Based on the algorithm for HARMONY-6068, I've made a patch for Long.toString(long). Since the big long numbers can have much more digits than integers, this algorithm can improve the performance a lot for big long numbers.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-6070) [luni] Improve Long.toString(long) performance

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-6070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12915305#action_12915305 ] 

Tim Ellison commented on HARMONY-6070:
--------------------------------------

Jim, can you give an example of where creating the String representation of a Long is going to be critical?  We should either apply the patch or reject it now.


> [luni] Improve Long.toString(long) performance
> ----------------------------------------------
>
>                 Key: HARMONY-6070
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6070
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>    Affects Versions: 5.0M8
>            Reporter: Jim Yu
>             Fix For: 5.0M9
>
>         Attachments: HARMONY-6070.diff
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Based on the algorithm for HARMONY-6068, I've made a patch for Long.toString(long). Since the big long numbers can have much more digits than integers, this algorithm can improve the performance a lot for big long numbers.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-6070) [luni] Improve Long.toString(long) performance

Posted by "Aleksey Shipilev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-6070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12662285#action_12662285 ] 

Aleksey Shipilev commented on HARMONY-6070:
-------------------------------------------

Wait, it's probably better to create internal org.apache.harmony.luni.Conversion or smth. like that and do the conversion for both ints and longs there.  This IS the code duplication.

> [luni] Improve Long.toString(long) performance
> ----------------------------------------------
>
>                 Key: HARMONY-6070
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6070
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>    Affects Versions: 5.0M8
>            Reporter: Jim Yu
>             Fix For: 5.0M9
>
>         Attachments: HARMONY-6070.diff
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Based on the algorithm for HARMONY-6068, I've made a patch for Long.toString(long). Since the big long numbers can have much more digits than integers, this algorithm can improve the performance a lot for big long numbers.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.