harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Shipilev (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-6056) [classlib][jit][opt][performance] Optimize heap allocations in String(String, int) constructor for JIT
Date Tue, 06 Jan 2009 15:00:46 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-6056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12661164#action_12661164

Aleksey Shipilev commented on HARMONY-6056:

Had a annual memory reset during NY :)

I agree with Kevin's rationale. Are you sure that the performance boost is about heap allocation?
The code in the patch and Integer.toString(int) look different.

On the other hand, if the added code in String(String, int) is inlined Integer.toString(int),
this is a code duplication. My first thought was: to avoid that, can we just make package-private
Integer.toString(char[], int, int), where we can put the target array, offset and the value?
Then in String(String, int) we may just call that method. And finally, we can reduce the code
duplication by calling the same method from Integer.toString() :)

It would also testify the performance boost is related to heap allocation, not the changed
conversion implementation.
If the boost is connected with specialized conversion for radix 10, then it's rather better
to specialize it at Integer, rather than at String :)

Does that makes sense?

> [classlib][jit][opt][performance] Optimize heap allocations in String(String, int) constructor
for JIT
> ------------------------------------------------------------------------------------------------------
>                 Key: HARMONY-6056
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6056
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>    Affects Versions: 5.0M8
>            Reporter: Kevin Zhou
>            Assignee: Tim Ellison
>             Fix For: 5.0M9
>         Attachments: HARMONY-6056.diff
>   Original Estimate: 24h
>  Remaining Estimate: 24h
> This patch optimizes heap allocations in String(String, int) constructor for JIT performance

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

View raw message